|There's more than one way to do things|
Replacing parts of a stringby spiderbo (Sexton)
|on Apr 11, 2003 at 13:55 UTC||Need Help??|
spiderbo has asked for the
wisdom of the Perl Monks concerning the following question:
I have a string,
I would like to replace three parts of the string, the first two should be feasible, I would like to replace '&month=04' and '&year=2003'(where 04 can be any two digits and 2003 can be any four digits) with ''.
However, my third replace is a little more complicated. I would like to replace '&CalendarName=102138Academic' with ''. The poblem is the length of the value of CalendarName (in this case 102138Academic) will vary.
The remaining parameters in the string I would like to leave as they are. The order of the parameters in the string may also vary.
Is the above possible?
Any advice apreciated!