Quote:
Originally Posted by
earnstaf
A couple co-workers have a disagreement. Can you guys please settle this?
One co-worker says regular expressions can inherently search and replace. His argument is that he can do a s/ regexp / replace in perl (and many other languages).
The other says that by definition regular expressions is just pattern matching and that is an outside function doing the replacing.
Thoughts?
Regular Expressions are just patterns...They do not perform any functions...It is the commands like sed or tr that we use along with the regular expression performs the functions like substitute/translate the pattern matched.
Its just my thought!