Beginner here and I'm trying to understand this. Can someone please break down the part in between the single quotes and describe what it does?
grep -oP '(?<=\S\/1\.\d.\s)[345]\d+'
Many thanks in advance!
Beginner here and I'm trying to understand this. Can someone please break down the part in between the single quotes and describe what it does?
grep -oP '(?<=\S\/1\.\d.\s)[345]\d+'
Many thanks in advance!
 
    
    \S matches any non-whitespace character (equal to [^\r\n\t\f\v ])\/ matches the character / literally (case sensitive)1 matches the character 1 literally (case sensitive)\. matches the character . literally (case sensitive)\d matches a digit (equal to [0-9]). matches any character (except for line terminators)\s matches any whitespace character (equal to [\r\n\t\f\v ])
Match a single character present in the list below [345]345 matches a single character in the list 345 (case sensitive)\d+ matches a digit (equal to [0-9])+ Quantifier — Matches between one and unlimited times, as many times as possible, giving back as needed (greedy)Output simply copied from https://regex101.com/r/HfJSNm/1 : very handy to test/share/have automatic explications on regexes.
