Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: Regular expression

by targetsmart (Curate)
on Jun 05, 2009 at 13:28 UTC ( #768795=note: print w/replies, xml ) Need Help??

in reply to Regular expression

if I have understood you correctly, this will do
$line =~ s/\$\d+|\$|<.*?>//g;
will make $line to
Lord: Of The Rings
BTW perlretut is your friend.
Please form your question correctly, I am not clear with your question. :(

-- In accordance with the prarabdha of each, the One whose function it is to ordain makes each to act. What will not happen will never happen, whatever effort one may put forth. And what will happen will not fail to happen, however much one may seek to prevent it. This is certain. The part of wisdom therefore is to stay quiet.

Replies are listed 'Best First'.
Re^2: Regular expression
by JavaFan (Canon) on Jun 05, 2009 at 14:36 UTC
    The OP only wants to delete dollars that aren't inside brackets, and aren't followed by digits. You delete everything between brackets (including the brackets), and any following digits.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://768795]
[Discipulus]: M4ver1k are you debug/dump vars in the loops? are you sure you are not quitting the loop earlier?
[Corion]: A good weekstart to everybody!
[Discipulus]: good morning nuns and monks! hello Corion

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2017-11-20 08:12 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (285 votes). Check out past polls.