I'm trying out this code in [PyPy 5.1.2 with GCC 5.3.1 20160413]
hiragana = "あえいおう"
regular = "aeiou"
mixed = "あえいおうaeiou"
print hiragana.split("い")
# ['\xe3\x81\x82\xe3\x81\x88', '\xe3\x81\x8a\xe3\x81\x86']
print regular.split("i")
# ['ae', 'ou']
I want to split the mixed string to get this.
# [ "\xe3\x81\x82\xe3\x81\x88", "\xe3\x81\x8a\xe3\x81\x86ae", "ou"]
The re module produces an unexpected result.
print re.split("[いi]", mixed)
# ['', '', '\x82', '', '\x88', '', '', '', '', '\x8a', '', '\x86ae', 'ou']
Questions:
Does python have a split using multiple delimiters function?