Express Sweet API Reference - v3.0.0
    Preparing search index...
    • Returns true if the given str matches the given regex.

      Parameters

      • val: string

        The string against which to match the regular expression.

      • pattern: string

        The text of the regular expression.

      • Optionalflags: string

        Regular expression flags, such as global and case-insensitive searches. The default is none (undefined).

      Returns boolean

      true if there is a match between the regular expression and the string str. Otherwise, false.

      {{regexMatch 'Hello, world!' 'Hello'}}
      {{regexMatch 'Hello, world!' 'Hello' 'i'}}
      {{#if (regexMatch 'Hello, world!' 'Hello')}}...{{/if}}