in reply to Re: Abbreviation regex?
in thread Abbreviation regex?
That's just screaming for factorisation. ;-)
Or, to possibly make the abbreviation stand out a bit more at the expense of some readability:/^a(|b(|b(|r(|e(|v(|i(|a(|t(|i(|o(|n)))))))))))$/
/^a(b(b(r(e(v(i(a(t(i(o(n|)|)|)|)|)|)|)|)|)|)|)$/
(The non-toy solution probably involves Text::Abbrev.)
|
|---|