Many thanks to Chipmunk and other folks,
I'll go away and play with these suggestions, which seem quite groovy (insofar as I can tell which ain't that far!) The reason for all of this is sort of related to my final-year project but not actually included in it (the project is in PHP): My tutor wrote a routine to do this kind of thing, which took him ages in some other language and I'm trying to introduce him to the power of Perl (and by extension, Perlmonks.)
In the virtual bar of pm I owe you all a pint.
Elgon
"Without evil there can be no good, so it must be good to be evil sometimes.
--Satan, South Park: Bigger, Longer, Uncut.
In reply to Re: Re: Regexps for Parsing Brackets in Chemical Formulae
by Elgon
in thread Regexps for Parsing Brackets in Chemical Formulae
by Elgon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |