SCRIPT MERIDIAN
REGEX PROJECT
 

Regex Home

Download

Documentation

 Regex Verbs
  regex.compile
  regex.easyMatch
  regex.easySearch
  regex.extract
  regex.free
  regex.grep
  regex.init
  regex.join
  regex.match
  regex.quoteRE
  regex.search
  regex.split
  regex.subst
  regex.visit

 MatchInfo Table
 Metacharacters

Pointers

Credits

 

regex.quoteRE

Syntax regex.quoteRE (s)
Params s is a string.
Action Quotes all metacharacters in s.
Returns The quoted string.
Examples regex.quoteRE ("Hello?")
    » "Hello\\?"
Notes Escaping a metacharacter tells the regex engine to treat any metacharacters in a pattern as literals, rather than as metacharacters.

This verb allows you to test a string to see if there are any metacharacters that need escaping.

Alternatively, if you automatically generate a pattern, you may not want any characters in the pattern to be treated as metacharcters.



 [ Previous ]  [ Next  To the top  

Send questions and comments to regex@lists.scriptmeridian.org.
Page last updated: Thu, 10 Dec 1998 21:59:17 GMT.