Skip to main content

matches

Type​

operator

Summary​

Compares a value to a wildcard pattern or regex pattern.

Syntax​

<value> matches { wildcard | regex } [pattern] <pattern>

Description​

Use the matches operator to determine if a value matches a wildcard pattern or regex pattern.

If the wildcard pattern form is specified, the pattern should be formatted as a wildcard pattern.

If the regex pattern form is specified, the pattern should be formatted as a regex pattern.

If the regex pattern form is specified, the pattern should be formatted as a regex pattern.

Parameters​

NameTypeDescription

value

The value is a string to be compared against the pattern

pattern

A regex pattern or wildcard pattern to compare to the value

Examples​

"foobar" matches wildcard pattern "*b*" -- evaluates to true
"Foobar" matches regex pattern "^f.*r$" -- evaluates to false
"Foobar" matches regex pattern "(?i)^f.*r$" -- evaluates to true

command: filter

glossary: operator, case-sensitive, value, string, expression, regex pattern, wildcard pattern

property: caseSensitive

Compatibility and Support​

Introduced

LiveCode Create 1.0

OS

mac

windows

linux

ios

android

web

Platforms

desktop

server

mobile

Thank you for your feedback!

Was this page helpful?