Tests if the regular expression "regexp" accepts "string".
match/2 Tests if the regular expression "regexp" accepts "string".
match/3 Tests if the regular expression "regexp" accepts "string". Substrings in bracketed expressions are returned in sequence in "matchlist".
regexp atom string atom matchlist list
match('(%d+)', 'one123four', L) => L = ['123']
match('(.*)a', barbara, L) => L = [barbar]
match('(.*?)a', barbara, L) => L = [b]
This predicate is not part of the ISO-Prolog Standard.
| scroll to top |
|