regex newbie
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
regex newbie
I am a new regex user and i have been trying to figure out how to delete multiple lines from a file. can anyone help please?
You're going to have to give more information than that if you want someone to help. Please give us a sample of the file and a sample of the lines you want to delete. Enclose the sample text in [ code][/code] tags in your reply to preserve formatting.
For general information about regular expressions, see this post.
For general information about regular expressions, see this post.
i replaced all the lines i wanted to delete with (nothing) so that it now looks like
Claims .rdl(458): <Value>=Fields!Description.Value</Value>
Claims1 .rdl(640): <Value>=Parameters!userid.Value</Value>(nothing)(nothing)(nothing)(nothing)(nothing)(nothing)(nothing)(nothing)(nothing)(nothing)(nothing)(nothing)(nothing)(nothing)(nothing)(nothing)(nothing)(nothing)(nothing)(nothing)(nothing)(nothing)
claims4 .rdl(743): <Value>=First(Fields!CompanyDESC.Value)</Value>
so now i need to use regex to search for every line that says nothing and delete them so that it now looks like
Claims .rdl(458): <Value>=Fields!Description.Value</Value>
Claims1 .rdl(640): <Value>=Parameters!userid.Value</Value>
claims4 .rdl(743): <Value>=First(Fields!CompanyDESC.Value)</Value>
I hope that helps...thanks
Claims .rdl(458): <Value>=Fields!Description.Value</Value>
Claims1 .rdl(640): <Value>=Parameters!userid.Value</Value>(nothing)(nothing)(nothing)(nothing)(nothing)(nothing)(nothing)(nothing)(nothing)(nothing)(nothing)(nothing)(nothing)(nothing)(nothing)(nothing)(nothing)(nothing)(nothing)(nothing)(nothing)(nothing)
claims4 .rdl(743): <Value>=First(Fields!CompanyDESC.Value)</Value>
so now i need to use regex to search for every line that says nothing and delete them so that it now looks like
Claims .rdl(458): <Value>=Fields!Description.Value</Value>
Claims1 .rdl(640): <Value>=Parameters!userid.Value</Value>
claims4 .rdl(743): <Value>=First(Fields!CompanyDESC.Value)</Value>
I hope that helps...thanks
-
ben_josephs
- Posts: 2464
- Joined: Sun Mar 02, 2003 9:22 pm