View Single Post
Old Nov 10th, 2006, 10:17 AM   #3
Dizzutch
Professional Programmer
 
Dizzutch's Avatar
 
Join Date: Dec 2004
Location: Worcester, MA
Posts: 441
Rep Power: 4 Dizzutch is on a distinguished road
Send a message via ICQ to Dizzutch Send a message via AIM to Dizzutch Send a message via MSN to Dizzutch Send a message via Yahoo to Dizzutch
in any regex [] creates a grouping of characters to match whereas {} tells the regex how many times to match something
[ab]{3}
will match a or b exactly 3 times.
anything in the [] will be matched, so
[a(ac)]
will actually match, a, (, a, c, or ). In your case you probable want the following regex
^a[bc]*(a|ac)
a good tool to use to test regex on linux is kregexpeditor or kodos, and for windows there a program called The Regulator, which can be found on sourceforge.
If this does not work, please post a couple of examples of strings you need matched for more clarity.
Good luck.

-Dizz
__________________
naked pictures of you | PFO F@H stats
Dizzutch is offline   Reply With Quote