in reply to Re: Regex: not the trailing whitespace
in thread Regex: not the trailing whitespace

Huh? /[*#]+:?/ cannot eat the trailing whitespace.
No, I mean the (.*) would. The leading string of bullets is the prefix, and the content of the line after that is the "main item".

Replies are listed 'Best First'.
Re^3: Regex: not the trailing whitespace
by ikegami (Patriarch) on Apr 23, 2011 at 06:54 UTC

    No, I mean the (.*) would.

    There is no /(.*)/ in your code. If you mean the /(.*\S)/, it can't eat the trailing whitespace either.

      I was explaining why I added \S to the end. The naive solution, a FAQ here, is (.*)(somethingelse).
        You said you were explaining why you added the look-behind ("look-back") assertion. If that's your explanation for \S, what's your explanation for the look-behind assertion?