Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2018-01-17 10:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How did you see in the new year?










    Results (198 votes). Check out past polls.

    Notices?