(?<!\d)\d+\.\d+ should match the numbers at the end of the lines and yet it won't. What am I doing wrong?

you are viewing a single comment's thread
view the rest of the comments
[–] 8 points 1 year ago* (3 children)

To put this into easier form:

(nota digit) (1ormore digit) (literal dot) (1ormore digit)

As far as I can see in that text, none of them end with "5.4” or "3.6” or "0.0”, so no your regex wont work

Maybe change the middle " \d+" into "\d*" , or surround the "\d+\." with a question mark group?

  • source
  • hideshow 3 child comments
  • [–] [S] 3 points 1 year ago (2 children)

    Thank you. Every time someone shows me something regarding regex, I feel like I'm getting lessons from a deity.

    You actually helped me out lots. I switched it to (?<!\d)\.*\d{1}+ thanks to your comment and it kinda did the job, so thank you.

  • source
  • parent
  • hideshow 2 child comments