Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

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

by ultranerds (Pilgrim)
on Sep 20, 2011 at 12:26 UTC ( #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


Comment on Re^2: Regex not quite working- [b] tags
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (14)
As of 2014-10-20 12:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (76 votes), past polls