in reply to Regex: matching character which happens exactly once
Here you go, this passes all of my test cases:
/^(?(?=((?(3)(?(?!.*\3)(?(?!((?<=(?!\3).(?=(?2)). |(?=\3)..)))(*F))))(?(?=.)(?=(.)(?1)))))(*F))/sx
Simple!*
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Regex: matching character which happens exactly once (updated)
by haukex (Archbishop) on Oct 24, 2017 at 11:24 UTC | |
|
Re^2: Regex: matching character which happens exactly once
by LanX (Saint) on Nov 12, 2017 at 20:28 UTC |