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.5
10.0
10.1
10.2
10.3
10.4
10.5
11.0
11.1
11.2
Statistic
FMM
Blog
Queries the result from execute.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
RegEx | 4.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example |
---|---|---|
RegExRef | The reference number for the regular expression returned from RegEx.Compile. | $regex |
Returns OK or error.
Loop and find all matches for pattern:
Set Variable [ $pattern ; Value: "(USt\-?ID:?|USt\-?IdNR\.?:?|Umsatzsteuer\-?ID:?|VAT\-?ID:?)[\s]?(DE)[\s]?([0-9]{9})" ]
Set Variable [ $ExecuteOptions ; Value: 0 ]
Set Variable [ $CompileOptions ; Value: "caseless" ]
Set Variable [ $regex ; Value: MBS("RegEx.Compile"; $Pattern; $CompileOptions) ]
Set Variable [ $offset ; Value: 0 ]
Loop
Set Variable [ $r ; Value: MBS("RegEx.Execute"; $regex; RegEx::Text; $ExecuteOptions; $offset) ]
Exit Loop If [ $r < 4 ]
Set Variable [ $s1 ; Value: MBS("RegEx.Substring"; $RegEx; 1) ]
Set Variable [ $s2 ; Value: MBS("RegEx.Substring"; $RegEx; 2) ]
Set Variable [ $s3 ; Value: MBS("RegEx.Substring"; $RegEx; 3) ]
Show Custom Dialog [ $s1 & ¶ & $s2 & ¶ & $s3 ]
Exit Loop If [ MBS("IsError") ]
Set Variable [ $offset ; $offset + Value: GetAsNumber(GetValue(MBS("RegEx.Results"; $regex); 2)) ]
End Loop
Set Variable [ $r ; Value: MBS("RegEx.Free"; $RegEx) ]
Created 26th October 2014, last changed 29th June 2018
Feedback: Report problem or ask question.