in reply to Re^2: How to use regular expression for this? (LCS)
in thread How to use regular expression for this?
Thanks a lot. AReed. Actually in my case the string and the pattern are usually not the same length, generally strings are longer than the length of the pattern. ( so string XXXXXABCXXXXXXXXXXXXXXXXXXX would be a match too.) That is why I initially think about regular expression. I guess I can still use your method by loop through the string and compare the substring with the same length as the pattern.
In Section Seekers of Perl Wisdom