in reply to Loop Through Scalar Obtain Information With Regular Expression

It's not hard to grab expressions in brackets, as long as there's only one level -- as long as brackets never appear inside other brackets, or escaped or as part of quoted text.

If, on the other hand, your expressions can ever look like

[w([one]|[two]|[three]|[four])]
or maybe
[w(one bracket \)|two brackets \))]
or
[w(one of these ")"|one of these "]")]
then we're in a whole other territory.

($_='kkvvttuubbooppuuiiffssqqffssmmiibbddllffss') =~y~b-v~a-z~s; print