Did you notice that /(ab)/ did also match <ab?
So what you want us to create for you is something that your little example doesn't ddo.
I'd suggest that you give us more information like:
- do you have some anchors?
eg: /^(ab)$/ is more specific than /(ab)/
- is there anything in the original re that you simplified to ab that might help?