AmI am using GNU grep with the -P PCRE Regex support for matching a strings from a file. The input file has lines containing the strings of typelike:
FOO_1BAR.zoo.2.someString:More-RandomString (string here too): 0.45654343
 I want to capture the numbers 2 and 0.45654343 from the above line. I used a regEx
grep -Po ".zoo.\K[\d+](.*):\ (.*)$" file
But this is producing me a result as
2.someString:More-RandomString (string here too): 0.45654343
 AmI am able to get the first number from the first capturing group as 2, and also have matchedto match a capturing group at the end of the line. But I am not able to skip the words/lines between two capturing groups.
 I know for a fact that I have a group (.*) itthat is capturing those words in the middle. What II've tried to do is include another \K to ignore it as
grep -Po ".zoo.\K[\d+](.*):\K (.*)$" file
 But thisthat gave me only the second capture group as    0.556984.
 alsoAlso with a non-capturing group with the (?:) syntax as
grep -Po ".zoo.\K[\d+](?=.someString:More-RandomString (string here too)):\ (.*)$"
But this gave me nothing. What am I missing here?
 
                 
                 
                 
                 
                