S stanks Active Member Licensed User Longtime User Jan 27, 2014 #1 hi i have this pattern Code: [0-9]{3}([A-Z]{3})[0-9]{3}\s+((?:20|1?[0-9]),\d{6})\s+((?:20|1?[0-9]),\d{6})\s+((?:20|1?[0-9]),\d{6})\r?\n which works ok. in it i have 4 groups. now my file have 2 or more same lines that this pattern can catch, but after reading and reading all about backreferences and repeating backreferences i still don't know how to add smthg to this pattern so i will catch again that 4 groups and check them with log, until i get to the end of file. any1 can help me with this? thanks ni advance
hi i have this pattern Code: [0-9]{3}([A-Z]{3})[0-9]{3}\s+((?:20|1?[0-9]),\d{6})\s+((?:20|1?[0-9]),\d{6})\s+((?:20|1?[0-9]),\d{6})\r?\n which works ok. in it i have 4 groups. now my file have 2 or more same lines that this pattern can catch, but after reading and reading all about backreferences and repeating backreferences i still don't know how to add smthg to this pattern so i will catch again that 4 groups and check them with log, until i get to the end of file. any1 can help me with this? thanks ni advance
Erel B4X founder Staff member Licensed User Longtime User Jan 28, 2014 #2 You can search for this pattern multiple times: Code: Dim m As Matcher = Regex.Matcher(...) Do While m.Find Loop Upvote 0
You can search for this pattern multiple times: Code: Dim m As Matcher = Regex.Matcher(...) Do While m.Find Loop
S stanks Active Member Licensed User Longtime User Jan 28, 2014 #3 Erel said: You can search for this pattern multiple times: Code: Dim m As Matcher = Regex.Matcher(...) Do While m.Find Loop Click to expand... omg i totally forget about loops thanks Erel Upvote 0
Erel said: You can search for this pattern multiple times: Code: Dim m As Matcher = Regex.Matcher(...) Do While m.Find Loop Click to expand... omg i totally forget about loops thanks Erel