Visual Studio Regular Expressions - Matching first word in a file
Is it possible to match the first word in a file using Visual Studio Regex?
e.g. ^using matches 开发者_开发百科multiple statements where "using" matches the first five characters on a line.
I need to find and replace the only first using statement where "using" matches the first five characters in the file.
Thanks,
M
Well, regex matches against a string. So, you could try reading the first line of the file into a string and execute a regex match against that string.
精彩评论