Archived

This topic is now archived and is closed to further replies.

Puzzler183

Regex Problems

Recommended Posts

After tinkering for quite a while, I''m stuck. PHP regex is different from what I''ve read about and used in Dev Studio. Basically, I want to match somethign like "%%x and %%y". I''ve tried: <\\0>and<\\1> \<\\0\>and\<\\1\> <\\0> and <\\1> and many others, all of which give errors... Anyway, I''m really stuck as to how to show the beginning and end of a word, and the help files only confused me further. So can anyone give me a tip on how to match the thing above?

Share this post


Link to post
Share on other sites
If you are using preg_match in PHP, the regular expression syntax is (mostly) Perl compatible. I'm not sure what it is you are trying to do; what do you mean by "match something like '%%x and %%y'"? Some sample input would help.

[edited by - spock on October 6, 2003 10:14:23 PM]

Share this post


Link to post
Share on other sites