# BASIC 256 - Language Documentation

en:replacex

## Replacex

### Formato

replacex ( haystack , regex , tostring )

### Description

Return a new string where all occurrences of substrings matching the regular expression regex are replaced by tostring in the string haystack.

### Example

    a$ = "Ouvi bossa e saí da fossa"
    print Replacex(a$,"bossa","sopa")
    print Replacex(a$, "[bf]ossa", "sopa")

will display

    Ouvi sopa e saí da fossa
    Ouvi sopa e saí da sopa

### New to Version

0.9.6.56

en/replacex.txt · Last modified: 2012/12/18 12:20 by m_santos