Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Regular expression

by targetsmart (Curate)
on Jun 05, 2009 at 13:28 UTC ( [id://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. :(

Vivek
-- 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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-25 17:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found