Can I regex (dont know if that's truely a verb, but i digress...) in string functions such as split, replace or strip?
What i want to do is with a file that has lines like
asd5Jkl;lk
132bn8K;lk
I want to split them whenever i have a number followed by a capital letter.
I immediatly thought usinng regex and somehing like pattern = "[0-9][A-Z]"
Ideally i'd split it between the number and letter, say with a '\n' so
[0-9][A-Z] would become [0-9] \n [A-Z]
any thoughts on this?
What i want to do is with a file that has lines like
asd5Jkl;lk
132bn8K;lk
I want to split them whenever i have a number followed by a capital letter.
I immediatly thought usinng regex and somehing like pattern = "[0-9][A-Z]"
Ideally i'd split it between the number and letter, say with a '\n' so
[0-9][A-Z] would become [0-9] \n [A-Z]
any thoughts on this?
Comment