Artificial intelligent assistant

Find and replace a pattern using sed or awk I have a file with multiple occurrences (more than 1000) of: REF*SY*111111111, REF*SY*777777777, REF*SY*145485450...etc. I need all the data be replaced with a standard output: REF*SY*111111111,REF*SY*111111111, REF*SY*111111111 ....etc. Can I do it with `sed` or `awk`?

`man sed` is your friend here. Making a few assumptions, I guess these should work for you:


sed -e 's/REF\*SY\*[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/REF*SY*111111111/g'
perl -pe 's/REF\*SY\*[0-9]{9}REF*SY*111111111/g'

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy ebca6ea156d0d6222e171a963521a39a