Think about Loose Coupling | |
PerlMonks |
Re: Re: Pattern Findingby demerphq (Chancellor) |
on Sep 17, 2001 at 03:19 UTC ( [id://112771]=note: print w/replies, xml ) | Need Help?? |
Well I came up with a solution but for bizarre reasons decided to obfu it, so I posted it as Pattern Matching Obfu, you will have to change the string $S as appropriate to your requireements. Your clarification of the constraints on the problem lead to some interesting angles, some that I suspect are unintended. Most especially that irrelevent of the short pattern solution there are likely to be very many long patterns, each of which _ONLY_ match once. My algorthm, in a rather humourous fashion found the following solutions, amongst many others, that meet your critera in a very short amount of time (the | is the seperator between sub patterns): Yves -- You are not ready to use symrefs unless you already know why they are bad. -- tadmc (CLPM)
In Section
Seekers of Perl Wisdom
|
|