Distance between regular expression
问题 Can we compute a sort of distance between regular expressions ? The idea is to mesure in which way two regular expression are similar. 回答1: There are a few of metrics you could use: The length of a valid match. Some regexs have a fixed size, some an upper limit and some a lower limit. Compare how similar their lengths or possible lengths are. The characters that match. Any regex will have a set of characters a match can contain (maybe all characters). Compare the set of included characters.