in reply to Regex doesn't wanna find the spaces :/

Aren't you making it more complex than it needs to be?

What's wrong with just:

$string =~ s/==\s*(.+?)\s*==/==$1==/g;
--

See the Copyright notice on my home node.

Perl training courses

Replies are listed 'Best First'.
Re^2: Regex doesn't wanna find the spaces :/
by ultranerds (Hermit) on Jun 24, 2009 at 10:44 UTC
    I tried that, and didn't seem to work =)

    Cheers

    Andy
      You are mistaken. You probably didn't have the "?".