|Welcome to the Monastery|
identifying arbitury patterns in multiple stringsby westernflame (Sexton)
|on Aug 18, 2005 at 16:14 UTC||Need Help??|
westernflame has asked for the
wisdom of the Perl Monks concerning the following question:
I have a list of strings with an element that I want to extract. However, that element is often preceded by arbitrary text that occurs in each entry. For example:
greater than 32
greater than 26
I would like to be able to cycle through a list and identify recurring patterns. How should I do this in perl?
Update: Sorry for not being clear enough. The data that I want to process has some parts that will be on each line (such as greater than) and some that are not (such as a number). The point is that the string that repeats itself is not known. What I want to identify is parts of each string that are present in every string.