sed
Using sed to extract text from files
sed -n -r 's/.*?something (.*?) here.*/\1/p'
Notes:
sedwill take its input fromstdinsedregex does not support\d, use[0-9]instead to match a digit
A breakdown of the sed "script" above:
-n: suppress printing of pattern space-r: use regular expressions in thesed"script"s/: search and substitute.*?: discard everything before the matching pattern(.*?): capture group for the text we want to extract.*: discard everything after the matching regex pattern\1: the value of the capture group/p: prints the matched capture group (represented by\1)