escaping
In regular expressions, escaping refers to canceling the special function of certain characters, typically when searching for punctuation.
These characters must be excaped if you want to search for the character:
. ^ $ * + ? ( ) [ ] { } | \
In CQL, also the double quotes " must be escaped.
To find a full stop (dot), it has to be escaped with a backslash: \.To find a backslash, the backslash has to be escaped with a backslash \\
For example, a dot (or full stop) ‘.’ in a regular expression is used to find any character. To find the actual dot or full stop, the dot has to be escaped to cancel its special function. A backslash is used to escape a dot.
∖.
In CQL, because regular expressions are used between the quotes, to find any noun in round brackets, this CQL should be used. The round brackets must be escaped.
[word="\("] [tag="N.*"] [word="\)"]
To find however with commas before and after, this CQL should be used. Commas do not need to be escaped.
[word=","] [word="however"] [word=","]
See also
Regular Expressions in corpus analysis
CQL – Corpus Query Language for corpus analysis
« Back to Glossary Index



