Getting "Unterminated [] installed." Error in C #
I work with the following regex in C #
Regex find = new Regex("[,\"]url(?<Url>[^\\]+)\\u0026");
and get this error:
"System.ArgumentException: parsing "[,"]url([^\]+)\u0026" - Unterminated [] set.
I'm kinda used to regular expressions, so correct me if I'm wrong. The regular expression should extract the URLs from the text match, for example:
URL = HTTP: //domain.com \ u0026
"URL = HTTP: //hello.com \ u0026
+5
2 answers
You avoid one of the brackets with \], which means you have unterminated [.
- .NET, . ! \ \\.
, . , .
-, , - Derek Slager.
+6