philsivyer
asked on
Inserting text before and after regex
Hello
I want to inset text before and after a date - example.
str5="Royal coronation year and dob is 1952/12/14 - great year. Another
good year was 1966/01/01"
puts str5.match(/\b(\d\d\d\d)\/ (\d\d)\/(\ d\d)/)
So, what I would like is to put say "YEAR" before and "END" after each date found
in the given format. So, the final result would be...
"Royal coronation year and dob is YEAR 1952/12/14 END- great year. Another
good year was YEAR 1966/01/01 END"
Regards
I want to inset text before and after a date - example.
str5="Royal coronation year and dob is 1952/12/14 - great year. Another
good year was 1966/01/01"
puts str5.match(/\b(\d\d\d\d)\/
So, what I would like is to put say "YEAR" before and "END" after each date found
in the given format. So, the final result would be...
"Royal coronation year and dob is YEAR 1952/12/14 END- great year. Another
good year was YEAR 1966/01/01 END"
Regards
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
busy
and spending the little time I had left for Experts Exchange in teh XSLT zone
I am happy that you missed me :-)
and spending the little time I had left for Experts Exchange in teh XSLT zone
I am happy that you missed me :-)
ASKER
Now I know where you are - thanks!
welcome
ASKER
Welcome back - where have you been?