Here you go, this passes all of my test cases:
/^(?(?=((?(3)(?(?!.*\3)(?(?!((?<=(?!\3).(?=(?2)). |(?=\3)..)))(*F))))(?(?=.)(?=(.)(?1)))))(*F))/sx
Simple!*
In reply to Re: Regex: matching character which happens exactly once
by haukex
in thread Regex: matching character which happens exactly once
by LanX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |