I've seen this example:
hello=ho02123ware38384you443d34o3434ingtod38384day
echo ${hello//[0-9]/}
Which follows this syntax: ${variable//pattern/replacement}
Unfortunately the pattern
field doesn't seem to support full regex syntax (if I use .
or s
, for example, it tries to match the literal characters).
How can I search/replace a string using full regex syntax?
See Question&Answers more detail:os