问题
i'm trying to capture a group (in notepad++) of digits.
Example:
StartOfLineCharacters[0..4 repeating groups of 32 digits and spaces]
How can i find all repeating groups starting with 0000 whatever the position of the group
Example: StartOfLineCharacters0001123456789012345678901234567800001234568901234567890123456780100123456789012345678901234567800001234567890123456789012345678
in this specific example I have 4 groups (groups starting in bold) where 2 groups start with 0000. It could be that not all groups are filled with characters.
I want to find all rows in a text file that contain 1 or more groups starting with these four zero's.
Hopefully someone can help me. I'm not new to regex but this is the first time i'm searching in repeating patterns and I want to capture all lines in one single regex (for future purposes). If it was for a single time I could use 4 regexes.
Kind regards
回答1:
Your example is one line:
00001123456789012345678901234567800001234568901234567890123456780100123456789012345678901234567800001234567890123456789012345678
and you mentioned in comments:
[Group1][Group2][Group3][Group4] IF 1 or more of these groups starts with "0000" the line should be bookmarked.
how long is length of Group1,2,3.. ? I think it is 5!
^((\d{5}){0,}0000\d(\d{5}){0,})
and I must mention: you missed 0 in the beginning of your numbers-line which I bold it!
来源:https://stackoverflow.com/questions/42369864/capturing-a-specific-repeated-group