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

$string =~ s|\=\=\s+?([a-z0-9_ &\[\]ÀÂÄàâäÇçÉÊÈËéêèëÏÌÎïìîÖÔÒöôòÜÛÙüûù +A-Z?!;«»()"]+)\s+?\=\=|==$1==|ge;

In your input data there is no string that has both, whitespace at the start and at the end. Maybe you want \s* instead of \s+? ? Note that appending a ? modifier is likely useless your case anyway, as you want to remove all whitespace before/after the ==, so it doesn't make sense to make that removal non-greedy.

Replies are listed 'Best First'.
Re^2: Regex doesn't wanna find the spaces :/
by ultranerds (Hermit) on Jun 24, 2009 at 10:43 UTC
    Thanks, works perfectly :)