Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

(jeffa) Re: Regular Expressions: Call for Examples

by jeffa (Bishop)
on Jul 21, 2002 at 22:09 UTC ( [id://183880]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my %TAG = (
       ftp     => 'ftp://',
    ...
       pad     => '/index.pl?node_id=108949&user=',
       DEFAULT => '/index.pl?node=',
    );
    
  2. or download this
    # takes care of [tag://target|alt]
    $chunk =~ s/\[(\w+):\/\/(.*?)\|([^\]]+)\]/<a href="$TAG{$1}$2">$3<\/a>
    +/g;
    ...
    
    # takes care of [target]
    $chunk =~ s/\[([^\]]+)\]/<a href="$TAG{DEFAULT}$1">$1<\/a>/g;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2024-04-23 19:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found