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 about the Monastery: (13)
As of 2016-06-28 17:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (359 votes). Check out past polls.