2011-06-23 57 views

回答

1

使用正則表達式如下:

@ManyToOne$ 

例如在C#中:

Regex rgx = new Regex("@ManyToOne$"); 

Console.WriteLine("Matches: " + rgx.IsMatch("@ManyToOne(fetch = LAZY)")); //Matches: false 
Console.WriteLine("Matches: " + rgx.IsMatch("@ManyToOne")); //Matches: true