The new forum looks nice. Thanks.
@Everyone,
At this point I've been working with RegEx for some time. I'm starting to feel more confident with what I can accomplish using RegEx. However, I need a little help with this one.
BASICS: I have three strings that get populated with numbers. Numbers 1 thru 52. The strings are populated for different reasons. I have been trying to use LookAhead to find any numbers that repeat 3x.
I have had some success at this, but it seems if there are more repeats or less repeats the result is not what I am looking for.
Here is the practice code I've been working on.
Code: Select all
let>String1=10;20;30;40;50;
let>String2=5;15;25;30;45;50;
let>String3=2;4;8;15;30;50;
RegEx>(.*)\b(.*)(\d\d?)(?=.*\b\1\b)(?=.*\b\2\b);,%String1%%String2%%String3%,0,MatchA,NomA,1,$1,Test
RegEx>(.*)\b(\d\d?)(?=.*\b\1\b);,Test,0,MatchB,NomB,1,$1,Last
mdl>%Test% / %Last% (%MatchB_1% / %MatchB_2% / %MatchB_3% / %MatchB_4%)
I could just use a loop to get all the matches, I suppose. But I like to make things complicated.
I'm not worried about the result being in the replace string so much, as just finding all repeats that repeat 3 times, consistently.
Don't be confused by my scrap code above. I am asking, "How can I find all repeats that repeat 3 times." Everything else is just me being complicated. However, if placing the results in the replace string is possible, with it working consistently I'd really like it to do that.
If you play with what I have and change the numbers to make more or less repeats, you should see how the result doesn't reflect all repeats.
Thanks in Advance,
PepsiHog