By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,361 Members | 1,824 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,361 IT Pros & Developers. It's quick & easy.

regex to exctract informations

P: n/a
Bob
Dears,

I am trying to search and replace strings with regex.

The string is identified by a keyword :

IDImage("1M234567");
DescriptionImage("Desc of the Image 1");

I want to exctract the IDImage (1M234567 ) and the Description.

The ID are characters and numbers, the description too.

Thx,

Bertrand
May 4 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Bob wrote:
Dears,

I am trying to search and replace strings with regex.

The string is identified by a keyword :

IDImage("1M234567");
DescriptionImage("Desc of the Image 1");

I want to exctract the IDImage (1M234567 ) and the Description.

The ID are characters and numbers, the description too.

Thx,

Bertrand

If the string is always in IDImage("#####");

Then what about

x='IDImage("#####");'
print x[9:-3]

Likewise for the Description.

HTH

Colin
May 5 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.