Muhammad J

Muhammad J

  • NA
  • 3
  • 1.4k

Making Regular Expression for Complex strings

Sep 21 2012 2:28 AM
Dear All
i have a string like this

#456*1*223435*......................................................#(new line)
#456*1*223436*......................................................#(new line)
#456*1*223437*......................................................#(new line)
#456*1*223438*......................................................#(new line)
#456*1*223439*......................................................#(new line)
....
....

and so on

now i want to make a regular expression which should match #456*1*223437* and remove only this line "#456*1*223437*......................................................#"

Means, i know this string #456*1*223437*, and second thing which i know is the last #which is coming at last of that string. is it possible to do with Regular Expressions?
i already tried to do it using String.Substrings(), Replace, Remove..... :-) but that is becoming very complex.


Answers (2)