Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: Regex not quite working- [b] tags

by ultranerds (Hermit)
on Sep 20, 2011 at 12:26 UTC ( [id://926921]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://926921]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2024-03-30 07:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found