I want to select the nth non-whitespace regex match. I have a txt file (string) with some data. Each data is separated by a space.
My regular expression find every match: /\S+/g
String:
12345 - - - 23.6 32 1003.0 0.00 3.20 28.60 0.00 0.00 25.8 21 - 2 - - 0 0.00 23.0 - - - 23.1 22.2 - - - 16 54 14 Ĺagiewniki_M.-16:54 0 - 12 09 - - - - - - - - 23.2 23.7 8.6 2 - -1 - - - - - - - - - - - - - - - - - - - - - 5.9 7080 12/09/2019 24.1 8.7 - - - - - - - - - - - - - 22.8 23.2 22.9 21.6 20.3 18.5 16.3 12.7 9.9 8.8 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 23.7 8.6 23.6 - 0 _ _ - _ 0 - - - - - - - 0 25.8 23.2 - 1005.0 1001.0 - --:-- --:-- - - 13.6 5.3 -.- 2019 _ 0 0 0 - - - - - - - - - - - - - - 50.683056 -18.51 - 95.0 31.0 - --:-- !!C10.37Of!!
I used https://regex101.com/ and I see the Math 1, 2 e.t.c on the site, but I can't find only one that I want to find (for example 5th match).