ROPE Language Reference - "match"

The "match" action takes two strings off the stack - a string to be checked, and another string that indicates how to check the first.

"string to check" "as" match

The second string (the one on the top of the stack) is a list of characters that indicate the types of characters checked for in the first. For example, the letter 'a' denotes lower case letters - so the following two lines are equivalent, and both print 0 (FALSE).

"string to check" "a" match println
"string to check" islower println

The following match characters are supported..

a - lower case letters A - upper case letters d - digits x - hex digits (0 to 9 and a to f) s - spaces (as per isspace)

All other characters simply match themselves. So the match string "aA_" matches letters in either upper or lower case and the under-bar character.

The following fragment lifts letters, digits and under-bar..

lift_while( { "aAd_" match } )