I just want to match some text in a Bash script. I\'ve tried using sed but I can\'t seem to make it just output the match instead of replacing it with something.
You could do this purely in bash using the double square bracket [[ ]] test operator, which stores results in an array called BASH_REMATCH:
[[ ]]
BASH_REMATCH
[[ "TestT100String" =~ ([0-9]+) ]] && echo "${BASH_REMATCH[1]}"