Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

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

by ultranerds (Friar)
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 romping around the Monastery: (7)
As of 2015-07-04 19:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls