in reply to Re^2: Multi-line string regex and negative inline match
in thread Multi-line string regex and negative inline match

by looking at the given regex, it fails because of the header column, So you'll have to either remove the header column or account for its existence.

qr/\A.*?-(?:[^|]*\|\s*activate complete\s*\|[^\n]*\n?)*\z/ms; Mabye?

Replies are listed 'Best First'.
Re^4: Multi-line string regex and negative inline match
by ikegami (Patriarch) on Jul 31, 2010 at 00:26 UTC

    I would simply insert (?:[^\n]*\n){2} after the \A.

    qr/(?x: \A (?:[^\n]*\n){2} (?: [^|]* \| \s* activate[ ]complete \s* \| [^\n]* \n? )* \z )/ms;

    For the finicky, [^|] could be changed to [^|\n]

      Yes, skipping 2 lines is better I guess

      Out of curiosity, What text editor do you use?

        UltraEdit and Eclipse with Epic
Re^4: Multi-line string regex and negative inline match
by josh803316 (Beadle) on Jul 31, 2010 at 05:46 UTC
    I guess my problem was that I had an extra empty line with a newline at the end of the string, if I remove the newline the regex matches (thank you). I'll just have to match for 0 or 1 potential newlines