re_substitute/4 has the following invocation:
re_substitute(+InputStr, +SubstrList, +SubstitutionList, -OutStr)
This predicate works exactly like string_substitute/4 described in
Section 1.6, except that the result of the substitution is
not interned (for the same reason as in re_substring/4. This
predicate will become an alias to string_substitute/4 when atom
garbage collection will be added to XSB.
| ?- re_bulkmatch('[^a-zA-Z0-9]+', '123&*-456 )7890| 123', 0, _, X),
re_substitute('123&*-456 )7890| 123', X, ['+++'], Y).
X = [match(3,6),match(9,11),match(15,17)]
Y = 123+++456+++7890+++123