Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Regex not working with sed

Tags:

regex

sed

i have this text in file

"0000000441244"
"0000000127769"

I want to replace all zeros with 'L'

I am trying this and nothing gets chnaged

sed -e 's/0+/L/g' regex.txt

sed -e 's/(0+)/L/g' regex.txt

I want to know where i am wrong

like image 554
user175386049 Avatar asked Jan 07 '13 04:01

user175386049


1 Answers

Try this

sed -e 's/0\+/L/g' regex.txt
like image 143
Mirage Avatar answered Oct 03 '22 01:10

Mirage