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 do it with the shell
while read -r line do case "$line" in *abc*[0-9]*xyz* ) t="${line##abc}" echo "num is ${t%%xyz}";; esac done <"file"