Hi yall, i've been searching and testing for a while, but can't find a way to replace all instances of a regex substring in a string, just with bash. I found this:
Code:
${parameter//pattern/string}
given this:
Code:
temp=<year>2006</year> <month>04</month>
when i run this:
Code:
echo ${temp//[^digit]/}
it prints out:
tt
I want to remove all characters except for numbers. Is this possible?