Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: followup on regex

by Wonko the sane (Deacon)
on Jul 21, 2003 at 19:24 UTC ( #276413=note: print w/replies, xml ) Need Help??


in reply to followup on regex

Your original regex has a flaw in the character class.

The '-' needs to be escaped.

This is a corrected pattern that should do what you want.

s/(copyright\s+[\d\-\s\,]*)/$1, 2003/i

Wonko

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://276413]
help
Chatterbox?
[stevieb]: use metamod::DateTime. Don't fsck around. Seriously. As someone who's done sensitive date/time stuff, don't roll your own. Use what is available and known stable. Do not guess.
[stevieb]: Date::Time even
[stevieb]: ffs I can't make DateTime link properly, so there.

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2017-04-29 04:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (531 votes). Check out past polls.