Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 9.4   9.5   10.0   10.1   10.2   10.3   10.4   10.5   11.0   11.1    Statistic    FMM    Blog  


Extracts found text.

Component Version macOS Windows Linux Server FileMaker iOS SDK
RegEx 11.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "RegEx.Extract"; Text; Pattern; Rewrite { ; Options } )   More


Parameter Description Example Flags
Text The text to use. "hello world"
Pattern The pattern to use. "l+"
Rewrite The output pattern. "\1\1"
Options The PCRE options.
Can be given as text or number.
0 Optional


Returns OK or error.


Extracts found text.
Similar like RegEx.Replace, but returns only the found text given to the pattern for output.


Extract phone number:

MBS( "RegEx.Extract"; "Call us at 01234/5678-90 to speak to sales."; "([0-9][0-9/\\-]+[0-9])"; "\1"; 1 )

Example result: 01234/5678-90

See also

Release notes

  • Version 11.1
    • Added RegEx.Extract function.

Created 19th February 2021, last changed 19th February 2021

RegEx.Execute   -   RegEx.FindMatches

Feedback: Report problem or ask question.

MBS Xojo PDF Plugins

Start Chat