イフコンピュータ > MINERVA > マニュアル > レファレンス > 述語 > 文書処理と正規表現 > substitute_all/4

substitute_all/4

MINERVA
ifcomputer logo
f
Expert Services on the Web

すべての部分文字列を置換える

substitute_all(+regexp、+string、+substitution、-result)

substitute/4は、"string"の中で"regexp"によって定義される部分列すべてを"substitution"と取り替えます。 修正された文字列は、"result"で返されます。

引き数

	regexp		atom
	string		atom
	substitution	atom
	result		atom

        substitute_all('a(.)', barbara, '%1a', L).
                ==> L = brabraa

括弧に入れられたものは何でも、項とされます。 左から右にi番目の開いた括弧に入れられたものは、i番目の項に割り当てられます。 括弧に入れられた項は、substitute/4とsubstitute_all/4で、substituteの中で%1...%9として 参照されます。

標準

この述語は、ISO-Prolog Standardには含まれません。

以下も参照して下さい

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

document: http://www.ifcomputer.co.jp/MINERVA/Manual/Reference/Predicates/regexp/substitute_all/print_jp.html
published 2008/8/25 update 2002/7/4 (c) 1996-2006 IF Computer Japan
IF Computer 〒113-0022 Tel 03-5814-3352 start (AT) ifcomputer.com
Customer Support 東京都文京区千駄木5-28-2   http://www.ifcomputer.co.jp
戻る> managed with ubiCMS