User Tools

Site Tools


en:replacex

This is an old revision of the document!


Replacex (Function)

Formato

replacex ( haystack_expr , regex_expr , string_expression )

returns string_expression ==== Description ==== Return a new string where all occurrences of substrings matching the regular expression regex_expr are replaced by string_expression in the string haystack_expr. ==== Example ==== <code> a$ = “Ouvi bossa e saí da fossa” print Replacex(a$,“bossa”,“sopa”) print Replacex(a$, “[bf]ossa”, “sopa”) </code> will display <code> Ouvi sopa e saí da fossa Ouvi sopa e saí da sopa </code> ==== Notes ==== By default the nature of regular expressions is “greedy”. This behaviour can be changed using the RegexMinimal statement. ==== See Also ====

==== History ==== |0.9.6.56|New to Version|

en/replacex.1471028078.txt.gz · Last modified: 2020/02/28 10:46 (external edit)