Friday 15 January 2010

regex - Replace /**/ in Unix with an empty space -


I wanted to change / ** / in all the files in a folder I tried:

  perl -pi -w -e's / \ / ** \ /// g; '*. Java   

but found an error: Quantifiers in the Nested Rifax;

    

> SAD / S / / / \ / / / / g; '

I need to replace the original / ** / with empty space.

You also need to avoid the stars to protect the readability, you can also use other delimiters Can:

  sed # / \ * \ * / ## g "   

No comments:

Post a Comment