Reply here when you do it, if you don't mind, I'm interested. I've only ever used List::Compare against arrays with a few thousand elements. Performance was quite acceptable under those conditions. . | [reply] |
You are talking about regexes, but your example shows the most trivial regex one can image, namely one that doesn't contain any
characters that are special. Do you want to match any possible regex, or are you just looking for matching strings? The latter is far, far more easier than the former - and the latter doesn't need the regex engine at all.
Abigail | [reply] |
Optimally, I want to match any regexp, but I am not sure if regexps in perl can handle this in a stable fashion. I've been using regexp to report all nested pattern matches with positions of matches using $-[0]:
m/(regexp)(?{
print $-[0]
)(?!)/;
but everywhere I look most people say to stay away from this stuff because:
1) it is not stable
2) it may not be supported in newer versions of perl.
So I'm not sure if I should take a more specific yet stable approach, or a generalisable yet potentialy unstable approach.
| [reply] [d/l] |
I don't see the connection between using the (?{ }) and (?!) to report all matches and your original question of finding "partial" matches.
But so, you want any regexp to match fuzzy. However, then your example is unclear - it's picking out positions in the regex (not in the string) to indicate where characters should be changed. Do you also want to be able to change special characters? Is it ok to introduce characters in the regex to make it match? (That would be easy, just add a | as the first character in the regex).
Abigail
| [reply] [d/l] [select] |