Meng Weng Wong on Wed, 7 Nov 2001 13:00:42 -0500


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: generating regexes?


On Wed, Nov 07, 2001 at 12:52:02PM -0500, Kyle R . Burton wrote:
| regexes.  For phone numbers, I'd rather have:
| 
|   \(?\d{3}\) \d{3}-\d{3}
| 
| than:
| 
|   .+\s\d+-\d+
| 
| or, worse:
| 
|   .+
| 

then you need a negative dataset which is not expected to
match, as well as a positive dataset which does.

add a survivial criterion: ($what,$you,$want) = /.../

and let the system evolve to get you what you want.

**Majordomo list services provided by PANIX <URL:http://www.panix.com>**
**To Unsubscribe, send "unsubscribe phl" to majordomo@lists.pm.org**