
Extracting Word from Variable
Quote:
> I have a variable $section that contains the string
> 'store=grocery">Grocery</a>'. How would I extract the word 'grocery'
> from the last part of this string? I assume I search for the word
> store= and extract all the characters until I reach " but don't know
> how to do this.
Others have answered your immediate question. But it appears you are trying
to parse/extract HTML.
If this is the case then be warned that REs are not the right tool to parse
HTML. You may want to use an HTML parser to parse HTML. It will make your
live and the live of others much easier.
jue