Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

wiki regex reprocessing replacement

by LanX (Cardinal)
on Feb 15, 2020 at 14:39 UTC ( #11112988=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
     DB<66> $_=$wiki; tf();tf();tf() ; print "'$wiki' \n=>\n'$_'" 
    '_*one /two/*_ _*three /four/*_ _*five /six/*_'
    =>
    '<u><b>one <i>two</i></b></u> <u><b>three /four/</b></u> <u><b>five <i
    +>six</i></b></u>'
     DB<67>
    
  2. or download this
     
      DB<40> %h = ( '*'=>'b', '/' => 'i' , '_' => 'u' ) 
    
    ...
    
      DB<65> $wiki='_*one /two/*_ _*three /four/*_ _*five /six/*_'
    
  3. or download this
      DB<90> sub tf { s{ $pre ([_*/]) (.*?) \2 (?=$post)}{$1<$h{$2}>$3</$h
    +{$2}>}xg }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://11112988]
Approved by marto
Front-paged by haukex
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2020-09-19 04:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If at first I donít succeed, I Ö










    Results (114 votes). Check out past polls.

    Notices?