-1

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

Luuk Krijnen
  • 1,180
  • 3
  • 14
  • 37
  • Could you please clarify a bit and show expected input and output? Digging into repeated captured groups is not possible with notepad++ regex engine (Boost), but depending on the actual task, one might be able to work around this, e.g. by using `\G` – Sebastian Proske Feb 21 '17 at 14:24
  • With "find" I only expect that all results containing 1 or more groups starting with four zero's could be bookmarked. Example..... lineStart[Group1][Group2][Group3][Group4] IF 1 or more of these groups starts with "0000" the line should be bookmarked. If neither of these groups starts with "0000" no bookmark will apply. – Luuk Krijnen Feb 21 '17 at 16:10
  • How does mark lines with a (normal text) of `0000` not do what you want. Please [edit] the question to explain clearly the expected output and also wahat you have done to solve the problem yourself. – AdrianHHH Feb 21 '17 at 16:32

1 Answers1

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!

MohaMad
  • 2,575
  • 2
  • 14
  • 26
  • Thanks for pointing me in the right direction. I have a starting sequence of 60+10digits+002 and than 4 groups of 32 digits and spaces. My regex has become: ^60\d{10}002((0000[0-9 ]{28}){1,4}) – Luuk Krijnen Feb 22 '17 at 07:24