D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

[LUG] perl substitutions

 

G'day all,

I have
blah blah [[here_is_some_text|and a bit more]]

I want it to look
blah blah [[here is some text|and a bit more]]

I can do it with a bunch of code, but I could really do with it being on one line.
I can do...
$a =~ s/\[\[(.*)_(.*)\]\]/\]\]$1 $2\]\]/
and nearly get there, but it only does one _

Any suggestions?

(I think all the code is correct, it works, so any errors in the above are my typing)

-- 
'ooroo

stinga...(:)-)
---------------------------------------------------
Email: stinga@xxxxxxxxxxxxx      o
You need only two tools.        o /////
A hammer and duct tape. If it    /@   `\  /) ~
doesn't move and it should,     >  (O)  X<  ~  Fish!!
use the hammer. If it moves and  `\___/'  \) ~
shouldn't, use the tape.           \\\
---------------------------------------------------

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html