i want to replace some text using regular expression but it doesn't work :
here is my text (some TSQL)
CREATE PROCEDURE [dbo].[DELETE_FILE]
(@FILE varchar(255))
AS
--Comment
exec master..xp_deletefile @FILE
/*
maxi comment
*/
GO
I want to delete blank lines and comments
Dim re As Regex
InputCode = re.Replace(InputCode, "^\s*\-{2,}.*$", String.Empty, RegexOptions.Multiline)
InputCode = re.Replace(InputCode, "^\s*\-{2,}.*$", String.Empty, RegexOptions.Multiline)
InputCode = re.Replace(InputCode, "/\*[.\n]*\*/", String.Empty, RegexOptions.Singleline)
the second replacement works but the other not. I tried my expression in a regex tester and they matches ! Someone can help me ??
here is my text (some TSQL)
CREATE PROCEDURE [dbo].[DELETE_FILE]
(@FILE varchar(255))
AS
--Comment
exec master..xp_deletefile @FILE
/*
maxi comment
*/
GO
I want to delete blank lines and comments
Dim re As Regex
InputCode = re.Replace(InputCode, "^\s*\-{2,}.*$", String.Empty, RegexOptions.Multiline)
InputCode = re.Replace(InputCode, "^\s*\-{2,}.*$", String.Empty, RegexOptions.Multiline)
InputCode = re.Replace(InputCode, "/\*[.\n]*\*/", String.Empty, RegexOptions.Singleline)
the second replacement works but the other not. I tried my expression in a regex tester and they matches ! Someone can help me ??