Page 1 of 1

how to parse out delimted variables from a string

Posted: Mon Apr 02, 2007 9:38 am
by tcl4p
Is there a way to use regular expressions to parse out delimited variables from a string? I have a project where the user has a description field defined as text in mysql. Inside the description field, which I can load from a query, there are delimited values such as %LastName%, %FirstName%, %Account% etc. However these variables are imbedded in sentences found in the description and therefore are not contiguous. I know I could use a loop to find the values, but wondered if there's some way to extract these values into a array.
Any help would be apprecitated.

Thanks,
Tom

Posted: Mon Apr 02, 2007 9:41 am
by feyd

Posted: Mon Apr 02, 2007 8:57 pm
by tcl4p
feyd,
I wonder if you give me the matching pattern for the delimiters above "%String Value%". I've tried several different pattern, but no luck.

Thanks,
Tom

Posted: Mon Apr 02, 2007 9:11 pm
by feyd
We've had many threads on the subject of matching the text between this and that. I'd rather not repeat what those threads have said.