Home > Software engineering >  For help: VBS regular expression matching problem
For help: VBS regular expression matching problem

Time:11-06

The new

Similar to the original

The first: "the plaintiff niuniu v. the defendant a county, the people's park (hereinafter referred to as a county park) contract infringement case"

Or

The second, "the plaintiffs had slightly logistics co., LTD. (hereinafter referred to as a moo) v. the defendant b county people's park (hereinafter referred to as b county park) administrative compensation case"

Or

The third: "the plaintiff nunu logistics co., LTD. (hereinafter referred to as the undertaking company) v. the defendant c city people's hospital (hereinafter referred to as the municipal hospital c), the defendant ding county, the people's park (hereinafter referred to as" ding county park) loan contract dispute case "

I want to use regular expressions of VBS "). * case "extract" infringement of contract "or" administrative compensation "or" loan contract dispute "the location of the string, that is the last one right parenthesis") "to" the case "between the strings, but in the second and third cases, always match to the front right parenthesis, rather than my last one want to match a right parenthesis,

Please directly expression how to write,

CodePudding user response:

1. Sometimes referred to as the plaintiff, sometimes not,
2. The defendants are referred to as ",
3. The defendant is a sometimes, sometimes is multiple,
4. The plaintiff and the defendant's name is not fixed,

CodePudding user response:

Modify before:
). * case 


Revised:
) (^)) * case 


Explanation: is starting from the parenthesis matching in addition to the content of the brackets
. All characters
In addition to the characters of brackets [^)]

CodePudding user response:

refer to the second floor, no method, response:
modify before:
). * case 


Revised:
) (^)) * case 


Explanation: is starting from the parenthesis matching in addition to the content of the brackets
. All characters
[^)] in addition to the characters of brackets

Thank you for your advice??
  •  Tags:  
  • VBA
  • Related