Solved

perl -i -pe replacement expression problem

Posted on 2002-04-11
2
354 Views
Last Modified: 2006-11-17
hello I am using the expression

perl5 -i -pe 's/expression/expressionnew/g' *.*

to replace things in a directory.  However I can't seem to figure out how to replace something with a backslash in it itself.  I need to replace:

Mousepads</a> |

with just

</a>

Getting all errors.  How I specify that?

thanks
0
Comment
Question by:webcs
2 Comments
 
LVL 84

Accepted Solution

by:
ozo earned 100 total points
ID: 6934414
perl5 -i -pe 's/Mousepads<\/a> \|/<\/a>/g' *.*
or
perl5 -i -pe 's"Mousepads</a> \|"</a>"g' *.*
0
 
LVL 2

Author Comment

by:webcs
ID: 6934519
perfect...thanks
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now