I’m kinda struggling with a supposedly pretty simple task:
I have two regex like these:
[A-Z0-9 /=-–!"#$().?@[]´/+=§°½¾ÄÖßÜ品纺]{1,18}
and ^[^0s][A-Z0-9_//=.-]{1,17}$
Now I need to make sure, that the _
-sign can’t be there back to back. I know that it should work with ?
to match 0 and 1 times, but I think I’m struggling with the capture group here.
To make it more understandable:
DF_TEST_123480 // valid
DF_TEST__312804=1234 // not valid
DF__TEST_312804=1234 // not valid
DF__TEST__312804=1234 // not valid
Is there an easy way to adjust this? I also tried using {0,1}
but as I said, I think because it is the capture group, it isn’t doing exactly what I’m looking for.