Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old


Queries a substring.

Component Version macOS Windows Linux Server iOS SDK
RegEx 4.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "RegEx.Substring"; RegExRef; Index )   More


Parameter Description Example
RegExRef The reference number for the regular expression returned from RegEx.Compile. $regex
Index The index for the substring. 0


Returns text or error.


Queries a substring.
Index 0 gives whole match and index from 1 to RegEx.CaptureCount gives substrings matched.


Find seller ID in an URL:

Let ([
pattern = "^http.*\?.*&seller=(.*)$";
text = "";

regex = MBS( "RegEx.Compile"; pattern; 512+1 );
r = MBS( "RegEx.Execute"; regex; text; 0 );
r = MBS( "RegEx.Substring"; regex; 1 );
f = MBS( "RegEx.Release"; regex )
] ; r )

See also

Example Databases

This function checks for a license.

Created 26th October 2014, last changed 26th April 2023

RegEx.Study - RegEx.SubstringList