Assuming I have the following string:
str = """
HELLO 1 Stop #$**& 5.02‼️ 16.1
regex
5 ,#2.3222
"""
I want to export all numbers , Whether int or float after the word "stop" with no case sensitive . so the expected results will be :
[5.02, 16.1, 5, 2.3222]
The farthest I have come so far is by using PyPi regex from other post here:
regex.compile(r'(?<=stop.*)\d+(?:\.\d+)?', regex.I)
but this expression gives me only [5.02, 16.1]