G+_Ubaid azm Posted June 18, 2015 Share Posted June 18, 2015 <<== will be gone if i execute perl pi -e ’s/\<\!-[^\>]+--\>//g’ *.txt if i tried to remove strings from line...: this will be gone <<==perl -pi -e ’s/this[^gone]+gone//g’ *.txt does not work... help me please... how do i do this.. Link to comment Share on other sites More sharing options...
G+_Joe Maruschek Posted June 18, 2015 Share Posted June 18, 2015 Your regular expression is not working the way it should. The way you have it written, you are telling it to match "this" followed by 1 or more characters that are not g, o, n, or e, then followed by "gone". This won't work because there is an "e" in "be" that spoils that match. Something like s/this.*gone// will work. Link to comment Share on other sites More sharing options...
G+_Ubaid azm Posted June 18, 2015 Author Share Posted June 18, 2015 thank you soo much Joe Maruschek Link to comment Share on other sites More sharing options...
Recommended Posts