in reply to Re^2: A sub named ∃
in thread A sub named ∃

/w isn't the pattern for matching the first character in identifiers. I never consider \w when matching that first character. In unicode, the pattern to follow is likely /\A\p{IdFirst}\w*\z/. In ASCII, the pattern is /\A[[:alpha:]_]\w*\z/. The pattern /\^\w+\z/ is always wrong when matching identifiers.

⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

Replies are listed 'Best First'.
Re^4: A sub named ∃
by vkon (Curate) on Nov 30, 2006 at 21:27 UTC
    all my concious life any unicode-capable perl matches with \w any unicode letter, and I often match russian letters e.g. 0x0432 with \w.

    I never did [[:alpha:]], but did succeeded russian letters matching with \w

      \w is [_\p{IsAlpha}\p{IsNumeric].

      ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

        Or, more concisely, [^\W\d]; so identifiers match /\b[^\W\d]\w*\b/. Gosh, I love that trick. :)

        - tye        

        Oh, I see. we were speaking oranges and green oranges...

        Still, my first sentence is valid (∃!~/\w/), but you're saying that's not enough for identifiers rule... but I was not intended to say that I am rediscovering identifier regexp!
        :)