On Dec 30, 2003, at 4:51 PM, Randy Brown wrote:


When I try the following, perl reads the * as a literal character, instead of my intent as a global value. Anyone see what I am missing?

perl -pi -e "s/<provider-url>file:*<\/provider-url>/REPLACED/g" testfile.txt

you might want to revisit


perldoc perlretut

since what you are in the midst of is a regular expression
and it is not clear to me that you really wanted to assert

zero or more ":"

rather than say

zero or more "any characters"

which would have been

perl -pi -e "s/<provider-url>file:.*<\/provider-url>/REPLACED/g" testfile.txt

"." is the "wild card" character, which you want to have
zero or more of, yes?


ciao drieux

---


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to