I have a string like "GoTo: 7018 6453 12654\n" I just want get the number something like this ['7018', '6453', '12654'], I tries regular expression but I can't split string to get just number here is my code:
Sample 1:
splitter = re.compile(r'\D');
match1 = splitter.split("GoTo: 7018 6453 12654\n")
my output is: ['', '', '', '', '', '', '', '', '7018', '6453', '12654', '']
Sample 2:
splitter = re.compile(r'\W');
match1 = splitter.split("GoTo: 7018 6453 12654\n")
my output is: ['GoTo', '', '7018', '6453', '12654', '']