Almost certainly using '\[' instead of '[' or Chr(91) will work.
--
Dave Rothgery
hi
I' m using Regex to search a string in a text file. But the string ends with a [.
How can i that in Regex?? I'll tryed it with the ascii value, but no success.
my string starts with 'mach_' and ends with '[' ( [=chr(91) in ascii )
example: mach_vtr [
my code
Dim regexp As Regex = New Regex("mach_ ((.|\n)*?)" & Chr(91) , RegexOptions.IgnoreCase)
error:
parsing "mach_ ((.|\n)*?)[" - Unterminated [] set. Parameter name: mach_ ((.|\n)*?)[
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: parsing "mach_ ((.|\n)*?)[" - Unterminated [] set. Parameter name: mach_ ((.|\n)*?)[
help ?!? :-}
thanks
Pieter