Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- s = ' playsound3Dwhenpossible(soundspotpoint18, %$videos_sounds_path%/sounds/lavazza_-_auguri_cherubini__15_.mp3, true, false, -52.644483, 0.947368, 90, 1, spotpoint18);'
- x = s.split("(")
- print(x)
- x = s.split("?=(")
- def split_keep_separator(source, sep):
- elements = source.split(sep)
- return [e for t in zip(elements, [sep] * (len(elements))) for e in t][:-1]
- s = ' playsound3Dwhenpossible(soundspotpoint18, %$videos_sounds_path%/sounds/lavazza_-_auguri_cherubini__15_.mp3, true, false, -52.644483, 0.947368, 90, 1, spotpoint18);'
- x = split_keep_separator(s, "(")
- print(x)
- # [' playsound3Dwhenpossible',
- # '(',
- # 'soundspotpoint18, %$videos_sounds_path%/sounds/lavazza_-_auguri_cherubini__15_.mp3, true, false, -52.644483, 0.947368, 90, 1, spotpoint18);']
- import re
- s = ' playsound3Dwhenpossible(soundspotpoint18, %$videos_sounds_path%/sounds/lavazza_-_auguri_cherubini__15_.mp3, true, false, -52.644483, 0.947368, 90, 1, spotpoint18);'
- x = re.split(r'(()', s)
Add Comment
Please, Sign In to add comment