Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

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. :(

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 pondering the Monastery: (4)
As of 2023-12-02 03:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (13 votes). Check out past polls.

    Notices?