Get Strings List In Python With Regex
I want extract strings from this text with regex: ¬~ZCC÷0¬ZAF÷~World¬~AA÷Eef~RZgth¬AD¬~AA÷jaKNedK8¬AD÷1502690400¬ADE÷~1502690400 expected output: ['ZCC÷0¬ZAF�
Solution 1:
For this task using a regex is a bit overkill. Just use the split() method
string = "¬~ZCC÷0¬ZAF÷~World¬~AA÷Eef~RZgth¬AD¬~AA÷jaKNedK8¬AD÷1502690400¬ADE÷~1502690400"
x = string.split("¬~")
print(x)
Post a Comment for "Get Strings List In Python With Regex"