Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Regex Misuse

by srawls (Friar)
on May 14, 2001 at 04:34 UTC ( #80126=perlmeditation: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    m/.{$width}/
    
  2. or download this
    substr($someVar,$offSet,$width)
    
  3. or download this
    $text =~ s/(.*)($string_1)(.*)($string_2)(.*)/$1$4$3$2$5/ 
    #taken from recent post
    if ($text =~ m/^.*(\.txt)$/) #used to see if $text ends in .txt
    
  4. or download this
    $text = s/($string_1)(.*)($string_2)/$3$2$1/
    if ($text =~ m/\.txt$/)
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (9)
As of 2014-12-18 04:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (41 votes), past polls