psionic086
asked on
How to code repeated regular expresion in VB.net for xml files
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("WordToBeTr anslated")
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)
m= pattern.Match(label)
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 ;)
Thanks,
Vojtech
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("WordToBeTr
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\(\
m= pattern.Match(label)
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 ;)
Thanks,
Vojtech
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Forgot the question mark for Example 1:
New Regex("^=code.Translate\(\ ""(.*?)\"" )$"), RegexOptions.IgnoreCase)
New Regex("^=code.Translate\(\
http://www.regular-express