Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: howto replace part of a string

by CountOrlok (Friar)
on Jun 14, 2006 at 15:26 UTC ( #555274=note: print w/replies, xml ) Need Help??


in reply to Re: howto replace part of a string
in thread howto replace part of a string

Is this what you're trying to do?
$a = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; $a =~ s/^\S{5}(\S{4})\S+/$1xxxx/ ;
-imran

Replies are listed 'Best First'.
Re^3: howto replace part of a string
by jeanluca (Deacon) on Jun 14, 2006 at 16:04 UTC
    You're right, but I realize now, because I didn't understand the expression, that it is not what I want!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://555274]
help
Chatterbox?
shmem puts down the Canon garments and dresses as Chancellor
[vrk]: Congratulations. You should have Cookies
[shmem]: thanks vrk - but I'll rather have a plate of "silly con charme"
Lady_Aleena is trying to explain perl regexen to people right now and explaining how variables expand in regexen.
[Lady_Aleena]: The people I'm talking with think /$var/ looks weird with some saying it shouldn't work.

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2017-04-28 09:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (520 votes). Check out past polls.