* I (davidf at woaf.net) wrote: > The generic solution is: > > ^([^_]_)\1*([^_]_)\2*$ Actually, its more fun than that - you want the second part to be optional iirc: giving: ^([^_]_)\1*(([^_]_)\3*)?$ ..david