Regular Expressions help

Alex Satrapa grail at
Mon Dec 9 22:20:56 EST 2002

Joel Pearson wrote:

> Just say I have this data “<option value=IMD> (IMDEX LIMITED) IMD”, 
> normally what happen is it pulls out IMB and IMDEX LIMITED.
What's the thing after the brackets? If it's always a short string, and 
never has brackets, you might want to try:

"/value=(.{3})> \((.+)\)[^)]+$/"

That is, match everything from the first bracket after the 
angle-bracket, to the last bracket before the end of the line.


More information about the linux mailing list