Loading ...
Sorry, an error occurred while loading the content.

23705RE: [Clip] Re: \W and underscore

Expand Messages
  • John Shotsky
    Mar 16, 2013
      Yet it works with \b as a word boundary. If it is treated as a word boundary, it is NOT being treated as a letter or number in THAT
      case. That is, a \b detects that a word ends, but \w includes the [_]. I don't care about history � PCRE is already different than
      Perl. It is not selfish to think that \w, which is defined as all letters and numbers, should actually BE all numbers and letters
      AND NOT the underscore. Nowhere else, in all of PCRE (as far as I know) does a non-letter and non-number count as a letter or a
      number. That is just wrong.

      RecipeTools Web Site: <http://recipetools.gotdns.com/> http://recipetools.gotdns.com/
      John's Mags Yahoo Group: <http://groups.yahoo.com/group/johnsmags/> http://groups.yahoo.com/group/johnsmags/

      From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of Don
      Sent: Saturday, March 16, 2013 21:00
      To: ntb-clips@yahoogroups.com
      Subject: Re: [Clip] Re: \W and underscore

      I think it should be as is. A _ is not a word boundary ... it is used
      to join the words.

      As Flo points out, they gave you a solution and as Axel points out there
      is another easy solution. If they happened to conclude that you were
      right, that would require all manner of recoding ... which is what you
      are disinclined to do here for your libraries apparently and yet the
      entire world would have to do so if your thought carries the day.

      I'd say it matters not what we think, because as Flo says, it has roots
      in Perl.

      On 3/16/2013 11:26 PM, John Shotsky wrote:
      > I would rather rename all underscores in the beginning to avoid this problem than have to convert my whole library to use that
      > nomenclature when all I want is for \w to work as it should. For example, I could convert the underscores to [_] (including the
      > brackets) and then all would work as expected.

      [Non-text portions of this message have been removed]
    • Show all 15 messages in this topic