Is there regex that matches an even number of occurrences of : in a single line
-
Is there regex that matches an even number of occurrences of : in a single line
Edit: elaborating on the exact problem. Here's what I'm trying to do:
The closest match in terms of regex flavor is Golang
-
Is there regex that matches an even number of occurrences of : in a single line
Edit: elaborating on the exact problem. Here's what I'm trying to do:
The closest match in terms of regex flavor is Golang
I've been trying to find a solution for hours and I can't figure it out
-
Is there regex that matches an even number of occurrences of : in a single line
Edit: elaborating on the exact problem. Here's what I'm trying to do:
The closest match in terms of regex flavor is Golang
@schratze@todon.nl you mean
(:.*?:)*? -
@schratze@todon.nl you mean
(:.*?:)*?@schratze@todon.nl well with some stuff inbetween it'd be like
^((:.*?:)|[^:])*$I think? -
I've been trying to find a solution for hours and I can't figure it out
What exactly is being matched doesn't matter as long as the match is in the correct line. This is for a Vale rule. So all the info I'm trying to get is "there's something wrong with the syntax in this line, please double check and fix"
-
@schratze@todon.nl well with some stuff inbetween it'd be like
^((:.*?:)|[^:])*$I think?@natty thanks, but these match any line with at least two colons in it. I added some info to the OP
-
@natty thanks, but these match any line with at least two colons in it. I added some info to the OP
@schratze@todon.nl hmm, I think this would be
:.*?:([^:]*)/mg -
@schratze@todon.nl hmm, I think this would be
:.*?:([^:]*)/mg@natty still the same issue

-
@natty still the same issue

@schratze@todon.nl Right the line shouldn't match at all if the pairs don't add up
^[^:]*:[^:]*?:([^:]*)$ -
N necrosis@chaos.social shared this topic