Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5   8.0    Statistic  


Queries a substring.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
RegEx 4.4 Yes Yes Yes Yes Yes

MBS( "RegEx.Substring"; RegExRef; Index )


Parameter Description Example value
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.Free"; regex )
] ; r )

See also

Example Databases

RegEx.Study   -   RegEx.SubstringList

Feedback: Report problem or ask question.

MBS Xojo Plugins