Regex: How to exclude groups having alphabetical chars / or capture lines having only numeric chars?
I am trying to create a pattern that matches numeric digits but exclude those which starts with any alphabets/words.
This is the sample text that i am trying to match :
| 30 | 00:45.3 | 00:42.4 | 2.4869 | 5.6578
| event/slno1 | 00:45.3 | 00:42.4 | 2.4869 | 5.6578
| event/slno2 | 00:00.0 | 00:00.0 | 0.0000 | 0.0000
| event/slno3 | 00:45.3 | 00:42.4 | 2.4869 | 5.6578
| event/slno4 | 00:00.0 | 00:00.0 | 0.0000 | 0.0000
I wrote this:
(d+)|s+(dd):(d+.d)s+|(dd):(d+.d)s+|(d+.d+)s+|(d+.d+)
i want to match only the
30 00:45.3 00:42.4 2.4869 5.6578 part and ignore th rest. How can I ignore the additional matches ?sure how i can negate the other ones.
Here the sample : regex101.com/r/ArZB3O/1
Read more here: Source link