공부
[Python] regexp split
승가비
2020. 6. 26. 01:00
728x90
l = re.compile("(?<!^)\s+(?=[A-Z])(?!.\s)").split(s)
https://stackoverflow.com/questions/13209288/python-split-string-based-on-regex
Python split string based on regex
What is the best way to split a string like "HELLO there HOW are YOU" by upper case words (in Python)? So I'd end up with an array like such: results = ['HELLO there', 'HOW are', 'YOU'] EDIT: ...
stackoverflow.com
728x90