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

Re^5: substitution in regular expression

by Anonymous Monk
on Apr 23, 2014 at 20:21 UTC ( [id://1083443]=note: print w/replies, xml ) Need Help??


in reply to Re^4: substitution in regular expression
in thread substitution in regular expression

Well it doesn't matter as long as the dictionary contains DEF in the last entry.

That appears to conflict with your originally stated requirement that the first of the three letters matched is to be removed.

Should the string be modified, shouldn't it be modified, or does it not matter whether the string is modified or not?

  • Comment on Re^5: substitution in regular expression

Replies are listed 'Best First'.
Re^6: substitution in regular expression
by aeqr (Novice) on Apr 23, 2014 at 20:28 UTC
    Sorry for being unclear, I would like to do this the way I've shown(global matching or replacement and in one line). It doesn't matter if the string is modified or not. In my attempt, it is modified because of the way I am trying to do it.

    But if you have a similar solution that doesn't modify the string, it's also fine.

      It doesn't matter if the string is modified or not. ... a ... solution that doesn't modify the string, it's also fine.

      Please see Re: substitution in regular expression from half an hour ago.

        Yes I saw your solution, I am copying it in order to send it to my teacher so I can get an A.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (5)
As of 2024-04-23 18:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found