rangematch(
TEXT
,
RANGE
)

The rangematch( function returns true (–1) if the text matches a specified range.


Parameters

This function has two parameters:

text – text to check.

range – specifies what characters are allowed to match. The range must be a series of character pairs, for example AZ for upper case alphabetic characters, AZaz for upper and lower case, 09 for numeric digits, etc. To match a single character, repeat that character twice, for example %% to match the percent symbol. Multiple ranges can be combined by appending them, for example AZaz09 ..??!!,, will match common English text (letters, numbers, spaces and sentence punctuation).


Description

This function returns true if text matches a specified range.

rangematch("ABC","AZ") ☞ -1 (true)
rangematch("ABC7","AZ") ☞ 0 (false)
rangematch("Now","AZaz") ☞ -1 (true)
rangematch("Now is the time","AZaz") ☞ 0 (false)
rangematch("Now is the time","AZaz  ") ☞ -1 (true)

In the final example above, notice that there are two spaces at the end of the range. This allows text with spaces to match.

Note: This function is equivalent to:

stripchar(thetext,therange)=thetext

See Also


History

VersionStatusNotes
10.0No ChangeCarried over from Panorama 6.0.