lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hello all!

I'm seeking for simply formulated and easy-coding string matching
task which is impossible to solve via currently existing regular
expressions handlers.

(Indeed I'm seeking for a complete definition of task classes that
regexps can't handle in principle.)

For example:

  Check that given string in lowercase contains no more than one entry
  of alphabet character.

  (so all permutations of subset of alphabet [a-z] should be matched)

Another example:

  Check that given string in lowercase contains all symbols of
  predefined alphabet. Ignore spaces.

  (so "the quick brown fox jumps over the lazy dog" should match)

My bet is that no existing regexp facilities may handle this
tasks. But maybe some of them can, so asking.

(I assume that calling user-supplied function from regexp handler
is not allowed. Or else this is trivially solved by Lua's gsub().)

-- Martin