>>>>> "OX" == Oliver Xymoron <oxymoron@waste.org> writes:
OX> Hmmm. Never had reason to use s in Perl..
Neither have I, but the point is that they're adding them on their own and
I don't want to worry about ever having a clash. Plus it just looks too
confusing.
OX> how about we put a modifier in front instead (obviously not s)?
Hmmm. That I like a bit more because we don't run out of delimiters (well,
we have a lot more of them to choose from) and we don't have to worry about
conflicts with the rest of the syntax.
On the other hand, I worry that it is still not visually distinctive
enough, and the name clash is troublesome. I.e. I really would prefer to
use 's' for substring, but that already has a meaning. (Or would I prefer
to use 's' for shell and 'e' for exact?) On the other hand, we can use
some tricks like using capital letters. There's already some precedent for
sticking something before a regexp; taboo expressions let you use '!' to
invert the sense of the match.
I don't expect to have more than four pattern types (perl, exact (no
metachars), shell-like, and whatever Bill comes up with, so the situation
I've already implemented (using separate delimiters) isn't so troubling.
So I guess I don't see anything really wrong with the way I have it working
now. If someone comes up with a sufficiently damning problem then I'll go
with the above method, else I'll just keep it the way it is now.
BTW, I'm planning to use '%' as the delimiter for csh-like patterns (just
DOS with '[]' enclosed classes; Russ already posted code to do this) and
'_' for Bill's solution. I can't say why I like '_', but I think:
_domain is aol.com_
just looks right.
- J<
References:
|
|