All substrings replaced...
Move to
Next Prev
Up Top
See also
match/2/3
match_all/3
substitute/4
substitute_all/4
chop/2
split/2/3
get_line/1/2
IF Computer > MINERVA > Manual > Reference > Predicates > Text Processing and Regular Expressions > substitute_all/4

substitute_all/4

All substrings replaced

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

substitute_all/4 replaces in "string" all substrings defined by "regexp" with "substitution". The modified string is returned in "result".

Arguments

	regexp		atom
	string		atom
	substitution	atom
	result		atom

Examples

	substitute_all('a(.)', barbara, '%1a', L).
		==> L = brabraa
Whatever is bracketed is assigned to a term. Whatever is bracketed by the from left to right i-th opening bracket is assigned to the i-th term. Bracketed terms can be referenced in substitute/4 and substitute_all/4 with %1...%9 in the substitute expression.

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,

read on...
MINERVA
ifcomputer logo
f
Expert Services on the Web
Language
English
Japanese
Server
USA
Japan
Site Access
Local Index
Local Contents
Site Contents
Site Index
Printer Friendly
For imode
For PDA
Search
document: http://www.ifcomputer.co.jp/MINERVA/Manual/Reference/Predicates/regexp/substitute_all/home_en.html
published 2010/8/30 update 2002/7/4 (c) 1996-2009 IF Computer Japan
IF Computer 5-28-2 Sendagi, Bunkyo-ku Tel +81-3-5814-3352 start (AT) ifcomputer.com
Customer Support Tokyo 113-0022 Japan   http://www.ifcomputer.com
scroll to top managed with ubiCMS