I am using regex to parse float number from the string.
re.findall("[^a-zA-Z:][-+]?\d+[\.]?\d*", t)
is the code that I used. There is a problem with this code. It is not parse the number if there is no space between number and any character. For Example, the expect output from "0|1|2|3|4|5|6|7|8|9" is [0,1,2,3,4,5,6,7,8,9], but it returns "[|1,|2,|3,...].
Is there any way to solve this kind of problem?
re.findall(r"[^a-zA-Z:]([-+]?\d*\.?\d+)", t)or Tryre.findall(r"(?<![a-zA-Z:])[-+]?\d*\.?\d+", t)[^a-zA-Z:]?