regex - Distance between regular expression -


Can we calculate a distance between regular expressions?

How is the idea that two regular expressions are similar?

There are some metrics you can use:

  1. The length of a valid match is a few regexs, a certain size, some one upper limit and some have a lower limit. Compare what their length or potential length is.

  2. The characters that match. Any regex will have a set of characters that can be in a match (probably all the characters). Compare the set of characters included.

  3. Use a larger document and see how many each regex matches and how many of them are similar.

Are you looking for tough equivalence?


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -