in reply to Generate a regex from text

Instead of trying to find regexes to match values, why not instead take the values to some canonical form? If Value A and Value B both transform to some canonical form C1, then they match. CPAN turns up: String::Canonical and String::Normal.

Replies are listed 'Best First'.
Re^2: Generate a regex from text
by Anonymous Monk on Feb 01, 2017 at 20:36 UTC
    this is the sane method
Re^2: Generate a regex from text
by porg (Novice) on Feb 04, 2017 at 03:30 UTC
    This is an intriguing concept. However, I don't understand how this would be better than using regex? isn't regex also 'philosophically' speaking just finding the canonical representation of the data using patterns?