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

RegEx.MatchList

Matches a list against a pattern.

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

MBS( "RegEx.MatchList"; Pattern; List; CompilerOptions; ExecuteOptions )

Parameters

Parameter Description Example value
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 optionNumberDescription
Caseless1Do caseless matching
Multiline2^ and $ match newlines within data
Dot All4. matches anything including NL
Extended8Ignore white space and # comments
Anchored16Force pattern anchoring
Dollar End Only32$ not to match newline at end
Ungreedy512Invert greediness of quantifiers
No Auto Capture4096Disable numbered capturing parentheses (named ones available)
Auto Callout16384Compile automatic callouts
FirstLine262144Force matching to be before newline
Dup Names524288Allow duplicate names for subpatterns
Newline CR1048576Set CR as the newline sequence
Newline LF2097152Set LF as the newline sequence
Newline CRLF3145728Set CRLF as the newline sequence
Newline Any4194304Recognize any Unicode newline sequence
Newline Any CRLF5242880Recognize CR, LF, and CRLF as newline sequences
BSR Any CRLF8388608\R matches only CR, LF, or CRLF
BSR Unicode16777216\R matches all Unicode line endings
JavaScript Compatible33554432JavaScript compatibility
No start optimize67108864Disable match-time start optimizations

Execute optionNumberDescription
Anchored16Force pattern anchoring
Not BOL128Subject string is not the beginning of a line
Not EOL256Subject string is not the end of a line
Not Empty1024An empty string is not a valid match
Partial32768Allow partial results.
Newline CR1048576Set CR as the newline sequence
Newline LF2097152Set LF as the newline sequence
Newline CRLF3145728Set CRLF as the newline sequence
Newline Any4194304Recognize any Unicode newline sequence
Newline Any CRLF5242880Recognize CR, LF, and CRLF as newline sequences
BSR Any CRLF8388608\R matches only CR, LF, or CRLF
BSR Unicode16777216\R matches all Unicode line endings
No start optimize67108864Disable match-time start optimizations
Partial Hard134217728Return partial result if found before .
Not Empty At Start268435456An empty string at the start of the subject is not a valid match
UCP536870912Use 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


RegEx.Match   -   RegEx.MinimumLength

Feedback: Report problem or ask question.




Links
MBS Xojo Plugins