Menu

Regex start line

Help
2007-03-06
2012-12-07
  • Roger Sperberg

    Roger Sperberg - 2007-03-06

    When I put a caret (^) at the beginning of my regex in a global replace, indicating I only want to match something at the beginning of a line, my regex doesn't match.

    But if I remove the caret, the regex works fine.

    This has happened four or so times. I'll try to test it more thoroughly to see if there's anything else I can learn.

    Roger

     
    • gnschmidt

      gnschmidt - 2007-03-06

      Is this in global or incremental find/replace? PCRE (the global replace regex engine) should handle this without question. Not sure about Scintilla's regex engine though.
      -Gerald

      PS I wonder if there's a way to use PCRE's POSIX interface as a drop-in replacement for Scintilla's regex engine. I need to look into this.

       
    • Roger Sperberg

      Roger Sperberg - 2007-03-06

      I was using global replace.

      I'll try to find some time to test this more thoroughly and come back with some examples of what I'm encountering.

      One thing I'm doing right now is converting tabular material pulled out of some webpages into XML so I want to make sure I'm only changing things from the start of a line. So far, the caret has been superfluous so it hasn't been something I've lingered over.

      Roger

       

Log in to post a comment.