ismatch

Synopsis

"string" ismatch 'pattern'

Determine if the string matches the specified pattern.

Parameters

"string" - the string to check

'pattern' - a regular expression pattern that defines a substring to match for

Side Effects / Notes

Examples

if ("(654) 555-1212" ismatch '\((\d\d\d)\) (\d\d\d-\d\d\d\d)') { ($areaCode, $phoneNumber) = matched(); println("dial 1 and $areaCode before $phoneNumber"); }

dial 1 and 654 before 555-1212

See Also