Sign up to the jQuery Grid Subscription list.

Solution for a pattern (Regular Expression)

Original post by cheatcountry at http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2362267&SiteID=1

The Question :

If I want the first letter in what I am looking for to be a value of a variable then how do I reference that variable in my reg expression?

The accepted answer : (By Gunjan246 )

string var = "A";
string pattern = @"\s" + var + "[A-Z]{0,4}\s";

0 comments:

Related Ads