Seems to work fine:my $test_string = q| [lien "dfgdgdg"][img]sdfsdfsdf[/img][/url] [lien "dfgdgdg33"][img]sdfsdfsdf[/img][/lien] Si qqn connait un transporteur ou une agence qui fais des bon prix [lien "http://www.smileycentral.com/?partner=ZSzeb001"][img]http://smi +leys.smileycentral.com/cat/12/12_1_220.gif[/img][/lien] pour l'australie je suis preneur merci............... BONNE ANNÉE [signature]|; $test_string =~ s/lien/url/sig; # the parser doesn't seem to like +this $test_string =~ s/\[url "([\?\%\:\/a-zA-Z0-9_\-\.=]+)"\]/[url=$1]/ +sig; while ($test_string =~ m%\[url=([\?\%\:\/a-zA-Z0-9_\-\.=]+)\]\[img +\]([\?\%\:\/a-zA-Z0-9_\-\.=]+)\[/img\]%gix) { print "FOO: $1 , and $2 \n"; }
FOO: dfgdgdg , and sdfsdfsdf FOO: dfgdgdg33 , and sdfsdfsdf FOO: http://www.smileycentral.com/?partner=ZSzeb001 , and http://smile +ys.smileycentral.com/cat/12/12_1_220.gif
while ($test_string =~ m%\[lien \"([\?\%\:\/a-zA-Z0-9_\-\.=]+)\"\] +\[img\]([\?\%\:\/a-zA-Z0-9_\-\.=]+)\[/img\]\[/lien\]%gix) { print "FOO: $1 , and $2 \n"; }
In reply to Re^4: BBCodes, removing [URL's
by Anonymous Monk
in thread BBCodes, removing [URL's
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |