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

Particular Regex Appears Region Broken in 7.4

Expand Messages
  • Amadeus Demarzi
    With the update to vim 7.4, it seems as if this particular regex just doesn t match in particular cases in 7.4, but it worked fine in 7.3. syntax region
    Message 1 of 6 , Aug 13, 2013
      With the update to vim 7.4, it seems as if this particular regex just doesn't match in particular cases in 7.4, but it worked fine in 7.3.

      syntax region jsRegexpString start=+\(\(\(return\|case\)\s\+\)\@<=\|\(\([)\]"']\|\d\|\w\)\s*\)\@<!\)/\(\*\|/\)\@!+ skip=+\\\\\|\\/+ end=+/[gimy]\{,4}+ contains=jsSpecial,jsRegexpCharClass,jsRegexpGroup,@jsRegexpSpecial,@htmlPreproc oneline

      Does not match in 7.4, but did in 7.3:
      var x = /test/;

      Matches in 7.4 and 7.3:
      return /test/;

      I am posting in here in case there is a simple quickfix that I am overlooking. Otherwise I can attempt to put together a more reproducible test case.

      Cheers,
      Amadeus

      --
      --
      You received this message from the "vim_dev" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      ---
      You received this message because you are subscribed to the Google Groups "vim_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Bram Moolenaar
      ... I ll see if I can reproduce it. Please try to come up with a simple search pattern that fails. You can use regexpengine to select the old code. A
      Message 2 of 6 , Aug 13, 2013
        Amadeus Demarzi wrote:

        > With the update to vim 7.4, it seems as if this particular regex just
        > doesn't match in particular cases in 7.4, but it worked fine in 7.3.
        >
        > syntax region jsRegexpString start=+\(\(\(return\|case\)\s\+\)\@<=\|\(\([)\]"']\|\d\|\w\)\s*\)\@<!\)/\(\*\|/\)\@!+ skip=+\\\\\|\\/+ end=+/[gimy]\{,4}+ contains=jsSpecial,jsRegexpCharClass,jsRegexpGroup,@jsRegexpSpecial,@htmlPreproc oneline
        >
        > Does not match in 7.4, but did in 7.3:
        > var x = /test/;
        >
        > Matches in 7.4 and 7.3:
        > return /test/;
        >
        > I am posting in here in case there is a simple quickfix that I am
        > overlooking. Otherwise I can attempt to put together a more
        > reproducible test case.

        I'll see if I can reproduce it. Please try to come up with a simple
        search pattern that fails. You can use 'regexpengine' to select the old
        code. A syntax command makes it difficult to pinpoint the problem.

        --
        From "know your smileys":
        ~#:-( I just washed my hair, and I can't do nuthin' with it.

        /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
        /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
        \\\ an exciting new programming language -- http://www.Zimbu.org ///
        \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

        --
        --
        You received this message from the "vim_dev" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php

        ---
        You received this message because you are subscribed to the Google Groups "vim_dev" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      • Amadeus Demarzi
        I am pretty bad with regex stuff, but I will try to figure out how to isolate it. I posted it here quickly just in case there was something silly I was missing
        Message 3 of 6 , Aug 13, 2013
          I am pretty bad with regex stuff, but I will try to figure out how to isolate it.

          I posted it here quickly just in case there was something silly I was missing in that snippet.

          For what it's worth, it's used in this syntax plugin:

          http://github.com/pangloss/vim-javascript

          And setting the regexpengine=1 | syntax enable fixes the problem, although it's a far from ideal solution.

          On Tuesday, August 13, 2013 11:09:49 AM UTC-7, Bram Moolenaar wrote:
          > Amadeus Demarzi wrote:
          >
          >
          >
          > > With the update to vim 7.4, it seems as if this particular regex just
          >
          > > doesn't match in particular cases in 7.4, but it worked fine in 7.3.
          >
          > >
          >
          > > syntax region jsRegexpString start=+\(\(\(return\|case\)\s\+\)\@<=\|\(\([)\]"']\|\d\|\w\)\s*\)\@<!\)/\(\*\|/\)\@!+ skip=+\\\\\|\\/+ end=+/[gimy]\{,4}+ contains=jsSpecial,jsRegexpCharClass,jsRegexpGroup,@jsRegexpSpecial,@htmlPreproc oneline
          >
          > >
          >
          > > Does not match in 7.4, but did in 7.3:
          >
          > > var x = /test/;
          >
          > >
          >
          > > Matches in 7.4 and 7.3:
          >
          > > return /test/;
          >
          > >
          >
          > > I am posting in here in case there is a simple quickfix that I am
          >
          > > overlooking. Otherwise I can attempt to put together a more
          >
          > > reproducible test case.
          >
          >
          >
          > I'll see if I can reproduce it. Please try to come up with a simple
          >
          > search pattern that fails. You can use 'regexpengine' to select the old
          >
          > code. A syntax command makes it difficult to pinpoint the problem.
          >
          >
          >
          > --
          >
          > From "know your smileys":
          >
          > ~#:-( I just washed my hair, and I can't do nuthin' with it.
          >
          >
          >
          > /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
          >
          > /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
          >
          > \\\ an exciting new programming language -- http://www.Zimbu.org ///
          >
          > \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

          --
          --
          You received this message from the "vim_dev" maillist.
          Do not top-post! Type your reply below the text you are replying to.
          For more information, visit http://www.vim.org/maillist.php

          ---
          You received this message because you are subscribed to the Google Groups "vim_dev" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
          For more options, visit https://groups.google.com/groups/opt_out.
        • Amadeus Demarzi
          Alright, so I am admittedly terrible with Regexes, but I think I did find something. Using this file for the regex test:
          Message 4 of 6 , Aug 13, 2013
            Alright, so I am admittedly terrible with Regexes, but I think I did find something.

            Using this file for the regex test:

            https://gist.github.com/amadeus/82d0288a9b8b2e3ff2a9

            And using this regex in search, with hlsearch on:

            \(\(\(return\|case\)\s\+\)\@<=\|\(\([)\]"']\|\d\|\w\)\s*\)\@<!\)\/

            Both engines 1 and 2 highlight the / right after `case` and `return`. Only engine 1 highlights the / on line 1 though.

            On Tuesday, August 13, 2013 12:56:21 PM UTC-7, Amadeus Demarzi wrote:
            > I am pretty bad with regex stuff, but I will try to figure out how to isolate it.
            >
            > I posted it here quickly just in case there was something silly I was missing in that snippet.
            >
            > For what it's worth, it's used in this syntax plugin:
            >
            > http://github.com/pangloss/vim-javascript
            >
            > And setting the regexpengine=1 | syntax enable fixes the problem, although it's a far from ideal solution.
            >
            > On Tuesday, August 13, 2013 11:09:49 AM UTC-7, Bram Moolenaar wrote:
            > > Amadeus Demarzi wrote:
            > >
            > >
            > >
            > > > With the update to vim 7.4, it seems as if this particular regex just
            > >
            > > > doesn't match in particular cases in 7.4, but it worked fine in 7.3.
            > >
            > > >
            > >
            > > > syntax region jsRegexpString start=+\(\(\(return\|case\)\s\+\)\@<=\|\(\([)\]"']\|\d\|\w\)\s*\)\@<!\)/\(\*\|/\)\@!+ skip=+\\\\\|\\/+ end=+/[gimy]\{,4}+ contains=jsSpecial,jsRegexpCharClass,jsRegexpGroup,@jsRegexpSpecial,@htmlPreproc oneline
            > >
            > > >
            > >
            > > > Does not match in 7.4, but did in 7.3:
            > >
            > > > var x = /test/;
            > >
            > > >
            > >
            > > > Matches in 7.4 and 7.3:
            > >
            > > > return /test/;
            > >
            > > >
            > >
            > > > I am posting in here in case there is a simple quickfix that I am
            > >
            > > > overlooking. Otherwise I can attempt to put together a more
            > >
            > > > reproducible test case.
            > >
            > >
            > >
            > > I'll see if I can reproduce it. Please try to come up with a simple
            > >
            > > search pattern that fails. You can use 'regexpengine' to select the old
            > >
            > > code. A syntax command makes it difficult to pinpoint the problem.
            > >
            > >
            > >
            > > --
            > >
            > > From "know your smileys":
            > >
            > > ~#:-( I just washed my hair, and I can't do nuthin' with it.
            > >
            > >
            > >
            > > /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
            > >
            > > /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
            > >
            > > \\\ an exciting new programming language -- http://www.Zimbu.org ///
            > >
            > > \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

            --
            --
            You received this message from the "vim_dev" maillist.
            Do not top-post! Type your reply below the text you are replying to.
            For more information, visit http://www.vim.org/maillist.php

            ---
            You received this message because you are subscribed to the Google Groups "vim_dev" group.
            To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
            For more options, visit https://groups.google.com/groups/opt_out.
          • Amadeus Demarzi
            Just curious if any headway has been made on this lookbehind regex issue? I only ask because it breaks a pretty popular JS syntax plugin. ... -- -- You
            Message 5 of 6 , Aug 21, 2013
              Just curious if any headway has been made on this lookbehind regex issue?

              I only ask because it breaks a pretty popular JS syntax plugin.

              On Tuesday, August 13, 2013 5:34:52 PM UTC-7, Amadeus Demarzi wrote:
              > Alright, so I am admittedly terrible with Regexes, but I think I did find something.
              >
              > Using this file for the regex test:
              >
              > https://gist.github.com/amadeus/82d0288a9b8b2e3ff2a9
              >
              > And using this regex in search, with hlsearch on:
              >
              > \(\(\(return\|case\)\s\+\)\@<=\|\(\([)\]"']\|\d\|\w\)\s*\)\@<!\)\/
              >
              > Both engines 1 and 2 highlight the / right after `case` and `return`. Only engine 1 highlights the / on line 1 though.
              >
              > On Tuesday, August 13, 2013 12:56:21 PM UTC-7, Amadeus Demarzi wrote:
              > > I am pretty bad with regex stuff, but I will try to figure out how to isolate it.
              > >
              > > I posted it here quickly just in case there was something silly I was missing in that snippet.
              > >
              > > For what it's worth, it's used in this syntax plugin:
              > >
              > > http://github.com/pangloss/vim-javascript
              > >
              > > And setting the regexpengine=1 | syntax enable fixes the problem, although it's a far from ideal solution.
              > >
              > > On Tuesday, August 13, 2013 11:09:49 AM UTC-7, Bram Moolenaar wrote:
              > > > Amadeus Demarzi wrote:
              > > >
              > > >
              > > >
              > > > > With the update to vim 7.4, it seems as if this particular regex just
              > > >
              > > > > doesn't match in particular cases in 7.4, but it worked fine in 7.3.
              > > >
              > > > >
              > > >
              > > > > syntax region jsRegexpString start=+\(\(\(return\|case\)\s\+\)\@<=\|\(\([)\]"']\|\d\|\w\)\s*\)\@<!\)/\(\*\|/\)\@!+ skip=+\\\\\|\\/+ end=+/[gimy]\{,4}+ contains=jsSpecial,jsRegexpCharClass,jsRegexpGroup,@jsRegexpSpecial,@htmlPreproc oneline
              > > >
              > > > >
              > > >
              > > > > Does not match in 7.4, but did in 7.3:
              > > >
              > > > > var x = /test/;
              > > >
              > > > >
              > > >
              > > > > Matches in 7.4 and 7.3:
              > > >
              > > > > return /test/;
              > > >
              > > > >
              > > >
              > > > > I am posting in here in case there is a simple quickfix that I am
              > > >
              > > > > overlooking. Otherwise I can attempt to put together a more
              > > >
              > > > > reproducible test case.
              > > >
              > > >
              > > >
              > > > I'll see if I can reproduce it. Please try to come up with a simple
              > > >
              > > > search pattern that fails. You can use 'regexpengine' to select the old
              > > >
              > > > code. A syntax command makes it difficult to pinpoint the problem.
              > > >
              > > >
              > > >
              > > > --
              > > >
              > > > From "know your smileys":
              > > >
              > > > ~#:-( I just washed my hair, and I can't do nuthin' with it.
              > > >
              > > >
              > > >
              > > > /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
              > > >
              > > > /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
              > > >
              > > > \\\ an exciting new programming language -- http://www.Zimbu.org ///
              > > >
              > > > \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

              --
              --
              You received this message from the "vim_dev" maillist.
              Do not top-post! Type your reply below the text you are replying to.
              For more information, visit http://www.vim.org/maillist.php

              ---
              You received this message because you are subscribed to the Google Groups "vim_dev" group.
              To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
              For more options, visit https://groups.google.com/groups/opt_out.
            • Amadeus Demarzi
              I can confirm that Patch 2 fixes this! Thanks so much! Seriously! ... -- -- You received this message from the vim_dev maillist. Do not top-post! Type your
              Message 6 of 6 , Aug 23, 2013
                I can confirm that Patch 2 fixes this! Thanks so much! Seriously!

                On Wednesday, August 21, 2013 11:45:52 AM UTC-7, Amadeus Demarzi wrote:
                > Just curious if any headway has been made on this lookbehind regex issue?
                >
                > I only ask because it breaks a pretty popular JS syntax plugin.
                >
                > On Tuesday, August 13, 2013 5:34:52 PM UTC-7, Amadeus Demarzi wrote:
                > > Alright, so I am admittedly terrible with Regexes, but I think I did find something.
                > >
                > > Using this file for the regex test:
                > >
                > > https://gist.github.com/amadeus/82d0288a9b8b2e3ff2a9
                > >
                > > And using this regex in search, with hlsearch on:
                > >
                > > \(\(\(return\|case\)\s\+\)\@<=\|\(\([)\]"']\|\d\|\w\)\s*\)\@<!\)\/
                > >
                > > Both engines 1 and 2 highlight the / right after `case` and `return`. Only engine 1 highlights the / on line 1 though.
                > >
                > > On Tuesday, August 13, 2013 12:56:21 PM UTC-7, Amadeus Demarzi wrote:
                > > > I am pretty bad with regex stuff, but I will try to figure out how to isolate it.
                > > >
                > > > I posted it here quickly just in case there was something silly I was missing in that snippet.
                > > >
                > > > For what it's worth, it's used in this syntax plugin:
                > > >
                > > > http://github.com/pangloss/vim-javascript
                > > >
                > > > And setting the regexpengine=1 | syntax enable fixes the problem, although it's a far from ideal solution.
                > > >
                > > > On Tuesday, August 13, 2013 11:09:49 AM UTC-7, Bram Moolenaar wrote:
                > > > > Amadeus Demarzi wrote:
                > > > >
                > > > >
                > > > >
                > > > > > With the update to vim 7.4, it seems as if this particular regex just
                > > > >
                > > > > > doesn't match in particular cases in 7.4, but it worked fine in 7.3.
                > > > >
                > > > > >
                > > > >
                > > > > > syntax region jsRegexpString start=+\(\(\(return\|case\)\s\+\)\@<=\|\(\([)\]"']\|\d\|\w\)\s*\)\@<!\)/\(\*\|/\)\@!+ skip=+\\\\\|\\/+ end=+/[gimy]\{,4}+ contains=jsSpecial,jsRegexpCharClass,jsRegexpGroup,@jsRegexpSpecial,@htmlPreproc oneline
                > > > >
                > > > > >
                > > > >
                > > > > > Does not match in 7.4, but did in 7.3:
                > > > >
                > > > > > var x = /test/;
                > > > >
                > > > > >
                > > > >
                > > > > > Matches in 7.4 and 7.3:
                > > > >
                > > > > > return /test/;
                > > > >
                > > > > >
                > > > >
                > > > > > I am posting in here in case there is a simple quickfix that I am
                > > > >
                > > > > > overlooking. Otherwise I can attempt to put together a more
                > > > >
                > > > > > reproducible test case.
                > > > >
                > > > >
                > > > >
                > > > > I'll see if I can reproduce it. Please try to come up with a simple
                > > > >
                > > > > search pattern that fails. You can use 'regexpengine' to select the old
                > > > >
                > > > > code. A syntax command makes it difficult to pinpoint the problem.
                > > > >
                > > > >
                > > > >
                > > > > --
                > > > >
                > > > > From "know your smileys":
                > > > >
                > > > > ~#:-( I just washed my hair, and I can't do nuthin' with it.
                > > > >
                > > > >
                > > > >
                > > > > /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
                > > > >
                > > > > /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
                > > > >
                > > > > \\\ an exciting new programming language -- http://www.Zimbu.org ///
                > > > >
                > > > > \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

                --
                --
                You received this message from the "vim_dev" maillist.
                Do not top-post! Type your reply below the text you are replying to.
                For more information, visit http://www.vim.org/maillist.php

                ---
                You received this message because you are subscribed to the Google Groups "vim_dev" group.
                To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
                For more options, visit https://groups.google.com/groups/opt_out.
              Your message has been successfully submitted and would be delivered to recipients shortly.