match/2/3

Tests if the regular expression "regexp" accepts "string".

match(+regexp, +string)

match(+regexp, +string, -matchlist)

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".

Arguments

	regexp		atom
	string		atom
	matchlist	list

Examples

	match('(%d+)', 'one123four', L)		=>	L = ['123']
	match('(.*)a', barbara, L)		=>  	L = [barbar]
	match('(.*?)a', barbara, L)		=>  	L = [b]

Standard

This predicate is not part of the ISO-Prolog Standard.

See also

regular expression, match/2/3, match_all/3, substitute/4, substitute_all/4, split/2/3, chop/2, get_line/1/2,


Darueber read on...