in reply to Traping [** using reg exp

First of all, what exactly is $item?

If it is one line of the text (as in Blacadder code) then it will work fine, if it isn't, then it won't work fine.

If it contains more then one line, then you probalby want to make it a multi line regex, by adding the m modifier.

Also, I would suggest you read about 'Greedy' and/or 'Maximal Match' in the perlre pod and/or perlretut pod

Replies are listed 'Best First'.
Re^2: Traping [** using reg exp
by Anonymous Monk on Sep 08, 2004 at 15:04 UTC
    replace Bladadder code in the previous post with jeffa's code...

    I guess it's time that I create an account so I can update my posts...