<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Using Regular expression in jscript</title><link>https://www.infopathdev.com:443/forums/thread/13184.aspx</link><pubDate>Tue, 29 Mar 2005 22:41:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13184</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13184.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13184</wfw:commentRss><description>Where is this function being called from? And what is the error you are receiving?&lt;br /&gt;&lt;br /&gt;Greg Collins [InfoPath MVP]&lt;br /&gt;InfoPathDev</description></item><item><title>Using Regular expression in jscript</title><link>https://www.infopathdev.com:443/forums/thread/12441.aspx</link><pubDate>Tue, 29 Mar 2005 05:40:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12441</guid><dc:creator>amish</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12441.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12441</wfw:commentRss><description>HiGuys,&lt;br /&gt;        Back again with a problem(most probably a silly one).&lt;br /&gt;&lt;br /&gt;I have written a function that will find a specifc pattern (in my case a date string in format mm-dd-yyyy.This date can be at any position in the input string) and replace it with something other string .&lt;br /&gt;The following is the function for that :&lt;br /&gt;***************************************************************&lt;br /&gt;function ReplaceDate(strInput)&lt;br /&gt;{&lt;br /&gt;var strResult;&lt;br /&gt;var objRegex = new RegExp("\d{1,2}-\d{1,2}-\d{4}"); //mm-dd-yyyy&lt;br /&gt;strResult = strInput.replace(objRegex, "HERO");&lt;br /&gt;return(strResult);&lt;br /&gt;}&lt;br /&gt;***************************************************************&lt;br /&gt;The regular expression used to search the date string looks fine.&lt;br /&gt;&lt;br /&gt;The problem is that when i call this function , the function is NOT able to FIND&amp; REPLACE date even though there is a date present in mm-dd-yyyy format in the input string.&lt;br /&gt;&lt;br /&gt;Can you please tell me where am i going wrong?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Amish</description></item></channel></rss>