How to code repeated regular expresion in VB.net for xml files
Posted on 2011-02-21
Hello I am looking for a solution to simple VB.net coding issue.
The problem is easy to explain but difficult to code for novice like us.
We are making translation program in VB.net fot xml reporting files. Our
reporting database already include translation expression for every word which should be translated in our reports, which looks like: code.translate("WordToBeTranslated")
We have already decoded it into phase which get us back all WordToBeTranslated list from whole report. But only if textbox contain exactly one code.translate expression. We are using nodes and node list with regular expression.
This regular expresions and matching in VB code looks exactly like this:
New Regex("^=code.Translate\(\""(.*)\"")$"), RegexOptions.IgnoreCase)
So, if theres more than one code.translate, program gets back everything from first "quote" to the latest quote and is unable to detect each expression separately.
Please if you can give me any advice how to resolve this, I can really appreciate it ;)