正規表現「regexp」が「文字列(string)」を受け入れるかどうか調べます。 ...
移動
次へ 前へ
上へ 最上
参考
match/2/3
match_all/3
substitute/4
substitute_all/4
chop/2
split/2/3
get_line/1/2
イフコンピュータ > MINERVA > マニュアル > レファレンス > 述語 > 文書処理と正規表現 > match/2/3

match/2/3

正規表現「regexp」が「文字列(string)」を受け入れるかどうか調べます。

match(+regexp, +string)

match(+regexp, +string, -matchlist)

match/2は、正規表現regexpがstring(文字列)を受け入れるかどうか調べます。

マッチ/3は、正規表現regexpがstringを受け入れるかどうか調べます。 括弧に入れられた表現における文字列の一部分は、matchlistの中で順序を保って帰されます。

引き数

	regexp		アトム
	string		アトム		
	matchlist	リスト

例題

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

規格

この述語は、ISO-Prolog Standardの要件ではありません。

以下も参照して下さい

正規表現, match/2/3, match_all/3, substitute/4, substitute_all/4, split/2/3, chop/2, get_line/1/2,

続く..
MINERVA
ifcomputer logo
f
Expert Services on the Web
言語
English
Japanese
サーバー
USA
Japan
サイトマップ
索引
目次
全体目次
全体索引
印刷向き
imode
PDA
探索
document: http://www.ifcomputer.co.jp/MINERVA/Manual/Reference/Predicates/regexp/match/home_jp.html
published 2008/6/30 update 1999/5/10 (c) 1996-2006 IF Computer Japan
IF Computer 〒113-0022 Tel 03-5814-3352 ifcj@ifcomputer.co.jp
Customer Support 東京都文京区千駄木5-28-2   http://www.ifcomputer.co.jp
冒頭へ managed with ubiCMS