in reply to Re: Regex not quite working- [b] tags
in thread Regex not quite working- [b] tags

Thanks guys, I tried something like this before, but I must have been missing the ? ... doh!

while ($post_message =~ /\[b\](.+?)\[\/b\]/sg) { print "BOLD: $1 \n\n"; $bold_length += length($1); }
Working like a charm now - thanks!

Andy