How do I make use of regular expressions in ECMA script task ?[Keywords : regular, expressions, RegExp, regular expressions]
book
Article ID: KB0091521
calendar_today
Updated On:
TIBCO IntegrationManager
|
-
|
Not Applicable
|
-
|
Description
Resolution:
Here is an example that shows how to make use of regular expressions in ECMA script task...
//Example to strip html tags
strInput = "<html>kjjljjlj<ggg>jjjllj</ggg>njlkjkljlj</html>";
writeln("Input : " + strInput);
var objRegExp = new RegExp("<(.|\n)+?>");
objRegExp.ignoreCase = true;
objRegExp.global = true;
strOutput = strInput.replace(objRegExp, " ")
writeln("Output : " + strOutput);
If you need more information on how to use regular expressions refer to the following link:
http://home.worldcom.ch/~jmlugrin/fesi/regexpext.html
Issue/Introduction
How do I make use of regular expressions in ECMA script task ?[Keywords : regular, expressions, RegExp, regular expressions]
Environment
Product: TIBCO IntegrationManager
Version: 4.5.0
OS: All
--------------------
Feedback
thumb_up
Yes
thumb_down
No