I have some problems with different strings being concatenated and which I would like to split again. I am dealing with things such as
name="o-n-Butylhydroxylamine1-MethylpropylhydroxylamineAmino-2-butanol"
which in this case should be split in
"o-n-Butylhydroxylamine", "1-Methylpropylhydroxylamine"
and "Amino-2-butanol"
Any thoughts how I could use strsplit
and/or gsub
regular expression to achieve this?
The rule I would like to use is that I would like to split a word when either a number, a bracket ("(") or a capital letter follows a lower caps letter. Any thoughts how to do this?