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

Re: [Clip] Re: \W and underscore

Expand Messages
  • Axel Berger
    ... You re absolutely right. I had taken John by his word and not tested this. In the text aaabbbccc aaa bbbccc aaabbb ccc aaa bbb ccc aaa_bbbccc aaabbb_ccc
    Message 1 of 15 , Mar 16, 2013
    • 0 Attachment
      "flo.gehrke" wrote:
      > As discussed here, the underscore is defined as a normal word character.

      You're absolutely right. I had taken John by his word and not tested
      this.

      In the text

      aaabbbccc
      aaa bbbccc aaabbb ccc aaa bbb ccc
      aaa_bbbccc aaabbb_ccc aaa_bbb_ccc
      aaa _bbb ccc aaa bbb_ ccc aaa _bbb_ ccc
      aaa_ bbb_ccc aaa_bbb _ccc aaa_ bbb _ccc

      the pattern "\bbbb\b" (b was a bad letter choice in hindsight) matches
      the last string in the second and in the fifth line, nothing else.

      Axel
    • John Shotsky
      You re right, I was not paying attention. It was selecting the last character, which was the underscore and the boundary was the following character. If you do
      Message 2 of 15 , Mar 17, 2013
      • 0 Attachment
        You're right, I was not paying attention. It was selecting the last character, which was the underscore and the boundary was the
        following character. If you do your test with a space following the underscore, you will see what I mean.

        Regards,
        John
        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 Axel Berger
        Sent: Saturday, March 16, 2013 23:51
        To: ntb-clips@yahoogroups.com
        Subject: Re: [Clip] Re: \W and underscore


        "flo.gehrke" wrote:
        > As discussed here, the underscore is defined as a normal word character.

        You're absolutely right. I had taken John by his word and not tested
        this.

        In the text

        aaabbbccc
        aaa bbbccc aaabbb ccc aaa bbb ccc
        aaa_bbbccc aaabbb_ccc aaa_bbb_ccc
        aaa _bbb ccc aaa bbb_ ccc aaa _bbb_ ccc
        aaa_ bbb_ccc aaa_bbb _ccc aaa_ bbb _ccc

        the pattern "\bbbb\b" (b was a bad letter choice in hindsight) matches
        the last string in the second and in the fifth line, nothing else.

        Axel



        [Non-text portions of this message have been removed]
      Your message has been successfully submitted and would be delivered to recipients shortly.