I see lots of examples and man pages on how to do things like search-and-replace using sed, awk, or gawk.
But in my case, I have a regular expression that I want to run
You can use sed to do this
sed -rn 's/.*abc([0-9]+)xyz.*/\1/gp'
-n
don't print the resulting line-r
this makes it so you don't have the escape the capture group parens()
.\1
the capture group match/g
global match/p
print the resultI wrote a tool for myself that makes this easier
rip 'abc(\d+)xyz' '$1'