Need to extract two possibilities

Any questions involving matching text strings to patterns - the pattern is called a "regular expression."

Moderator: General Moderators

Post Reply
mzfp2
Forum Contributor
Posts: 137
Joined: Mon Nov 11, 2002 9:44 am
Location: UK
Contact:

Need to extract two possibilities

Post by mzfp2 »

Hi,

Its probably the simplest of expressions but my only hope is probably this forum!

I was wondering if and how I could extract a string based on two possibilities:

The regular expressions should match either this:

90 lenses - £27.00

or

(9 lenses) - £54.00

is it possible to match both in one expression?, &pound must be matched as that and not the symbol itself.

Any help on this would be really appreciated!

Musaffar
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

what are you hoping to get out of it? Do you want values returned or just to know if it matches?

what have you tried so far?
Post Reply