[thelist] How to tell if a regular expression is valid?
Bret Daniel
BDaniel at Chemnavigator.com
Thu Jul 15 09:55:06 CDT 2004
Try this software... works pretty well
http://www.onlythebestfreeware.com/program.asp?program_id=172
-Bret
-----Original Message-----
From: Jason Lustig [mailto:jasonlustig at adelphia.net]
Sent: Wednesday, July 14, 2004 3:59 PM
To: Thelist at Lists.Evolt.Org
Subject: [thelist] How to tell if a regular expression is valid?
So I'm working on a PHP script in which the user inputs a the search and
replace sections of a regular expression in a form. For example, they
might input "\[b\](.*?)\[\/b\]" (without the quotes) as the search
section and "<b>\1</b>" as the replace part, and then the PHP script
puts them together in the preg_replace() function.
The only thing is, I want the script to check to see if the regular
expressions they put in are valid, i.e. if they will work. I've done
some searching on a regular expression to test if regular expressions
are valid or something like that. Any ideas?
Thanks!
Jason
--
* * Please support the community that supports you. * *
http://evolt.org/help_support_evolt/
For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !
More information about the thelist
mailing list