http://www.perlmonks.org?node_id=483426

davidz2f has asked for the wisdom of the Perl Monks concerning the following question:

I was wondering how to do this in Perl: Say a pattern is "ABCDEFGHI", how to determine a string matchs any three letters in the right order: for example, the matched strings are: ABCXXXXXX; AXCDXXXXX; AXXDXFXXX; .... AXXXXXXHI; ........ XXXXXXGHI; How to use regular expression for this? (In the real program, the patern could be >70 letters long and may require matching 35 letters in the right order).