At the character level, CQP supports regular expressions using one of two regex libraries:
CWB 3.0: Uses POSIX 1003.2 regular expressions (as provided by the system libraries). A full description of the regular expression syntax can be found on the regex(7) manpage.
CWB 3.5: Uses PCRE (Perl Compatible Regular Expressions). A full description of the regular expression syntax can be found on the pcrepattern(3) manpage; see also http://www.pcre.org/.
Various books such as Mastering Regular Expressions give a gentle introduction to writing regular expressions and provide a lot of additional information. There are also many tutorials to be found online using Your Favourite Web Search EngineTM.
<reg.exp.> word, word, ...to indicate that the regular expression before the arrow matches the word or words after the arrow. In many programming languages, it is customary to enclose regular expressions in forward slashes (/). CQP uses a different syntax: regular expressions are written as (single- or double-quoted) strings. The examples below omit any delimiters.
[^aeiou]
b, c, d, f, ..., 1, 2, 3, ..., ä,
à, á, ...
{
}
(exactly ),
{
,
}
()
go{2,4}d
good, goood, goood
\
) “escapes” special characters, i.e. forces them to match literally
\?
?;\(\)
();
.{3}
...;\$\.
$.
\^
and \$
must be escaped although ^
and $
anchors are not useful in CQP