regex.find, regex.findW

LuaFAR 3

regex.find, regex.findW


from, to [,c1 [,c2]...] = regex.find (s, pattern, [init], [cflags])

Parameters:
  s       :  string
  pattern :  string
  init    :  integer (default=1; can be negative)
  cflags  :  string (any combination of 'i','m','o','s' and 'x')

Returns:
  from    : integer
  to      : integer
  c1,...  : strings (there can be false in place of captures
                     not participated in the match)

Description:
  The function is similar to string.find, but differs from it
  by the meaning of its optional 4-th parameter:
  -- cflags : compilation flags;

Note:
regex.findW receives its 1-st argument and returns captures in
UTF-16LE encoding.

Far API used:
  RegExpControl