Re: RFC 198 (v2) Boolean Regexes
[email protected] ("Richard Proctor") Wed, 27 Sep 2000 12:24:01 +0100
| Newsgroups | perl.perl6.language.regex |
|---|---|
| Message-ID | <[email protected]> |
HI Tom, Welcome to England (I presume) > This seems very complicated. Did you look at the Ram:6 recipe on > expressing AND, OR, and NOT in a regex? For example, to do > /FOO/ && /BAR/ you need not write /FOO.*BAR|BAR.*FOO/ -- and in > fact, should not, as it doesn't work properly on some pairs! > For example, /CAN/ && /ANAL/ can't be written /CAN.*ANAL|ANAL.*CAN/ > of you expect to match "CANAL". Overlaps bite you. You really > need /(?=.*CAN)(?=.*ANAL)/ instead, which permits multiple assertions. > Please check out the recipe I'm talking about. > > --tom, from a strange place I will start by admiting I dont have the RAM. I was brainstorming ideas (my day job involves a lot of brainstorming) and trying to think of new/better ways to do things. I am more interested in concepts than syntax. Richard