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.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
RegEx.MatchList
Matches a list against a pattern.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| RegEx | 4.4 | Yes | Yes | Yes | Yes | Yes |
MBS( "RegEx.MatchList"; Pattern; List; CompilerOptions; ExecuteOptions ) More
Parameters
| Parameter | Description | Example |
|---|---|---|
| Pattern | The pattern to use. | "H(.*)" |
| List | The list of texts to search. | "Hello" |
| CompilerOptions | A number for the options to use. e.g. 1 for case insensitive or 512 for ungreedy. Can be given as text or number. |
512+1 |
| ExecuteOptions | The options for executing. Can be given as text or number. |
0 |
Result
Returns list or error.
Description
Matches a list against a pattern.This compiles the pattern, executes it and looks if we have a match or not for each list item.
Returns the list items which match.
| Compile option | Number | Description |
| Caseless | 1 | Do caseless matching |
| Multiline | 2 | ^ and $ match newlines within data |
| Dot All | 4 | . matches anything including NL |
| Extended | 8 | Ignore white space and # comments |
| Anchored | 16 | Force pattern anchoring |
| Dollar End Only | 32 | $ not to match newline at end |
| Ungreedy | 512 | Invert greediness of quantifiers |
| No Auto Capture | 4096 | Disable numbered capturing parentheses (named ones available) |
| Auto Callout | 16384 | Compile automatic callouts |
| FirstLine | 262144 | Force matching to be before newline |
| Dup Names | 524288 | Allow duplicate names for subpatterns |
| Newline CR | 1048576 | Set CR as the newline sequence |
| Newline LF | 2097152 | Set LF as the newline sequence |
| Newline CRLF | 3145728 | Set CRLF as the newline sequence |
| Newline Any | 4194304 | Recognize any Unicode newline sequence |
| Newline Any CRLF | 5242880 | Recognize CR, LF, and CRLF as newline sequences |
| BSR Any CRLF | 8388608 | \R matches only CR, LF, or CRLF |
| BSR Unicode | 16777216 | \R matches all Unicode line endings |
| JavaScript Compatible | 33554432 | JavaScript compatibility |
| No start optimize | 67108864 | Disable match-time start optimizations |
| Execute option | Number | Description |
| Anchored | 16 | Force pattern anchoring |
| Not BOL | 128 | Subject string is not the beginning of a line |
| Not EOL | 256 | Subject string is not the end of a line |
| Not Empty | 1024 | An empty string is not a valid match |
| Partial | 32768 | Allow partial results. |
| Newline CR | 1048576 | Set CR as the newline sequence |
| Newline LF | 2097152 | Set LF as the newline sequence |
| Newline CRLF | 3145728 | Set CRLF as the newline sequence |
| Newline Any | 4194304 | Recognize any Unicode newline sequence |
| Newline Any CRLF | 5242880 | Recognize CR, LF, and CRLF as newline sequences |
| BSR Any CRLF | 8388608 | \R matches only CR, LF, or CRLF |
| BSR Unicode | 16777216 | \R matches all Unicode line endings |
| No start optimize | 67108864 | Disable match-time start optimizations |
| Partial Hard | 134217728 | Return partial result if found before . |
| Not Empty At Start | 268435456 | An empty string at the start of the subject is not a valid match |
| UCP | 536870912 | Use Unicode properties for \d, \w, etc. |
Please pass sum of the numbers to select options.
Examples
Match Hello with pattern:
MBS( "RegEx.MatchList"; "H(.*)o"; "Hello¶Test¶World¶House¶Test")
See also
Blog Entries
Created 2nd November 2014, last changed 17th October 2017
RegEx.Match - RegEx.MinimumLength
Feedback: Report problem or ask question.
Links
MBS Xojo PDF Plugins