What regular expression pattern can I use to match words that can be shortened by leaving letters at the end?
For example, suppose the word "internationalization" and I want to match any of the following:
internationalization internationalizatio internationalizati internationalizat internationaliza internationaliz internationali international internationa internation internati internat
Or if the word "punctuation"
punctuation punctuatio punctuati punctuat punctua punctu punct
What is the best way to do this? I know I can do something like
punctuation|punctuatio|punctuati|punctuat|punctua|punctu|punct
but I hope there will be a more elegant way.
source share