using sed for search and replace multi-digits

Viewed 4667

i have the following list of files:

r1 r2 10 r11 r99

I am trying to replace all the numbers after the r in the file names in an ls output

result i am looking for:

 rA rA  rA  rA  rA

Using the following sed command i can match files r1 r2 but not r10 r11 and r99

   ls | sed -e 's/r[0-9]/rA/'

It provides me with the following output:

rA
rA0
rA1
rA
rA9

Appreciate if someone can point out what i am missing in the sed search pattern, can sed be used to match multiple digit numbers at all?

thank you.

1 Answers
Related