in reply to Re: modifying list of numbers
in thread modifying list of numbers

Hey sauoq,

thanks for the advice. How could i modify your code to have it pick up the entire string and just append to the end of the list? I had something like :

s/[cC]opyright*.*?$/$&,$year/g

but that doesnt pick up in cases where there are extra words after the year such as "Copyright 1990-2002, blah blah more text here" Instead I need something that will make it "Copyright 1990-2002,2003, blah blah more text here"

thanks much! jc

Replies are listed 'Best First'.
Re: Re: Re: modifying list of numbers
by sauoq (Abbot) on Jul 18, 2003 at 20:26 UTC

    That would be a little less complicated actually. How about something like:

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

    Edit: Changed character class to use a literal space and (oops) put the hyphen in the right place: at the end.

    -sauoq
    "My two cents aren't worth a dime.";
    
      awesome. thanks!