Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Take out date part of my field value

by socketdave (Curate)
on Aug 24, 2005 at 14:45 UTC ( #486211=note: print w/ replies, xml ) Need Help??


in reply to Take out date part of my field value

$field =~ s/\(\d{2}\/\d{2}\/\d{2}\)//;
This will strip out the parentheses and the date. You were on the right track, but regex quantifiers (other than *, + and ?) use {}.

Hope this helps.


Comment on Re: Take out date part of my field value
Download Code
Replies are listed 'Best First'.
Re^2: Take out date part of my field value
by derby (Abbot) on Aug 24, 2005 at 14:54 UTC

    ++ the only thing I would change is the delimitter ... then no need to escape the slash.

    $field =~ s#\(\d{2}/\d{2}/\d{2}\)##;
    -derby

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2015-08-01 02:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (285 votes), past polls