Contents

Roo

Regex.matches?()

Returns True if this Regex object’s search pattern matches against text t. Returns False otherwise.

regex.matches?(t as Text) as Boolean

Parameters

  • t. Text. The text to search

Returns

  • If at least one match is found then it returns True, otherwise returns False

Example

var r = |hello|i
r.matches?("Hello world!") # => True
r.matches?("Hiya") # => False