Home > Net >  Consult a regular expression question: are analyzing "XXX" - (x-y) range of reverse order
Consult a regular expression question: are analyzing "XXX" - (x-y) range of reverse order

Time:10-10

In the project, the need to match a regular type, the key code is as follows:
Match Match=Regex. Match (@ "frame \ [\ d +] #", existingFrameXPath);//this newspaper sometimes abnormal
If (match. Success)
{
}

Among them, the regular type as follows:
Frame # \ \ [\ d + \]
ExistingFrameXPath variable values for the following content, will be an error:
Frame # [2]//* [@ id="channel - all"]/div [1]/ul [1]/li [7]/[1] a
An error exception information:
Are analyzing "frame # [2]//* [@ id=" channel - all "]/div [1]/ul [1]/li [7]/a [1] "- (x-y) range of order

But with her before I write a regular type tester, matching the same content, but not an error,
Same as the regular type:
Frame # \ \ [\ d + \]
Match the content for the same:
Frame # [2]//* [@ id="channel - all"]/div [1]/ul [1]/li [7]/a [1]
  •  Tags:  
  • C#
  • Related