On Sat, Sep 08, 2007 at 12:12:10AM +0100, Nicholas Clark wrote:
: On Fri, Sep 07, 2007 at 03:50:09PM -0700, Larry Wall wrote:
: > I dunno, maybe <\ws> isn't so bad...
: But as soon as I saw it I thought the same as you say in the paragraph above -
: in the context of a regexp (or string) \ makes me think that one character is
: being back-whacked, rather than it applying to the entire token.
: I suspect my brain will think of rules like regexps. (But I could be wrong,
: and unlike quite a few people on this list, I've not written any yet, so my
: opinion might be of little value)

Well, we could go off in a TeXish direction and say that \foo is a
non-capturing <foo>, and \w, \d, etc. are just <w>, <d>, etc.  Then
your whitespace is just \ws, and your word boundary is just \wb.

That would simplify how you define your own \w sequences as well.

\xfe gets a little problematic under that view though, unless we
require all rules starting with x to be called <xfeefiefoefoo>.
Or require people to use \x[fe], which also kinda sux.


Reply via email to