--> replace('satyam(kaushik','\(',' ') will return o/p as satyam kaushik.Here we write \( in second args to read ( beacause it is escapes regular expression ( and read only (.
--> \ put only in sec arg to escape and not in third arg
-->= sign not involved in special character.Hence = sign has no need to escape.
--> To escape from all regular expressions use following function
The functx:escape-for-regex function escapes a string that you wish to be taken literally rather than treated like a regular expression. This is useful when, for example, you are calling the built-in fn:replace function and you want any periods or parentheses to be treated like literal characters rather than regex special characters.
No comments:
Post a Comment