In c#, there is a line of code such as:
string[] values = Regex.Split(fielddata, @"[;]+");
On what values does this split? I’m getting a bit confused by the mixture of literals from the @ sign and what the square braces and + mean here. Any ideas?
@ is a verbatim string literal, meaning you don’t have to escape special characters. As Asad already said, it splits on one or more consecutive semicolon, where + stands for 1 or more (regex grammar)
Here’s a runnable example: http://ideone.com/whLqUe
outputting