[semidet]re_match(+Regex,
+String)
?- re_match("^needle"/i, "Needle in a haystack").
true.
Options:
- anchored(Bool)
- If
true, match only at the first position - bol(Bool)
- Subject string is the beginning of a line (default
false) - bsr(Mode)
- If
anycrlf,\R only matches CR, LF or CRLF. Ifunicode,\R matches all Unicode line endings. Subject string is the end of a line (defaultfalse) - empty(Bool)
- An empty string is a valid match (default
true) - empty_atstart(Bool)
- An empty string at the start of the subject is a valid match (default
true) - eol(Bool)
- Subject string is the end of a line (default
false) - newline(Mode)
- If
any, recognize any Unicode newline sequence, ifanycrlf, recognize CR, LF, and CRLF as newline sequences, ifcr, recognize CR, iflf, recognize LF and finally ifcrlfrecognize CRLF as newline. - start(+From)
- Start at the given character index
| Regex | is the output of re_compile/3,
a pattern or a term Pattern/Flags, where Pattern is an atom or string.
The defined flags and there related option for re_compile/3
are below.
|