티스토리 뷰
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
'공부' 카테고리의 다른 글
[Python] Making a job fail in jenkins (0) | 2020.06.26 |
---|---|
[Sh] sleep (0) | 2020.06.26 |
[Python] regexp split (1) | 2020.06.26 |
[Python] contains HashSet (0) | 2020.06.26 |
[Kafka] basic (0) | 2020.06.18 |
[SQL] pivot table (0) | 2020.06.18 |