in reply to Traping [** using reg exp

Is it possible that your text actually looks like this:

IM GSD Prod (Windist) [** REQUIRES USER CONTEXT **] ^---Space characters--^

Because the regex actually did work for me. Also, it wouldn't hurt to anchor the bigging of the regexp to the beginning of the line with m/^(.+)...... Probably unnecessary, but I like being explicit within regexps whenever possible.


Dave

Replies are listed 'Best First'.
Re^2: Traping [** using reg exp
by ikegami (Patriarch) on Sep 08, 2004 at 15:15 UTC
    Or maybe there's whitespace at the end of the line? Try changing /...$/ to /...\s*$/ (or omit the $ completely).
Re^2: Traping [** using reg exp
by Anonymous Monk on Sep 08, 2004 at 15:11 UTC
    Yours probably worked because that is the only line you have. His data ends with a line that doesn't ends with [**REQUIRES USER CONTEXT**]