in reply to Nonrepeating characters in an RE
Hi BernieC.
I'm a bit confused about your requirements. The other replies seem to address the problem of detecting if a string has repeated characters. In this case, I don't understand the purpose of the "template" (with or without repeated characters in it).
If the template is 'abc', does the string 'xxxabcxxx' have any repeated characters? I assume 'abca' does. How about 'xxaxxaxx', and if so, what are the specific repeats?
IOW, I don't understand the relationship of the "template" to the strings presumably being tested against it. Can you clarify?
Update: hippo has already made this point, but it bears repeating: Please see the articles How to ask better questions using Test::More and sample data and Short, Self-Contained, Correct Example for ways to clearly state a problem or a set of requirements associated with a problem so that others may easily and directly address your question. Please help us to help you.
Give a man a fish: <%-{-{-{-<
|
---|