<?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>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: xpath replace functionality</title><link>https://www.infopathdev.com:443/forums/thread/79665.aspx</link><pubDate>Tue, 19 Jun 2012 20:38:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:79665</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/79665.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=79665</wfw:commentRss><description>&lt;p&gt;Is there a chance that WordA can occur in the string multiple times?&amp;nbsp; If not, I think this would work:&lt;/p&gt;&lt;p&gt;concat(substring(&lt;u&gt;field&lt;/u&gt;, 1, 1000 *&amp;nbsp;not(contains(&lt;u&gt;field&lt;/u&gt;, &amp;quot;WordA&amp;quot;))), substring(concat(substring-before(&lt;u&gt;field&lt;/u&gt;, &amp;quot;WordA&amp;quot;), &amp;quot;WordB&amp;quot;, substring-after(&lt;u&gt;field&lt;/u&gt;, &amp;quot;WordA&amp;quot;)), 1, 1000 * contains(field, &amp;quot;WordA&amp;quot;)))&lt;/p&gt;</description></item><item><title>xpath replace functionality</title><link>https://www.infopathdev.com:443/forums/thread/79664.aspx</link><pubDate>Tue, 19 Jun 2012 20:31:34 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:79664</guid><dc:creator>sheilaA</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/79664.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=79664</wfw:commentRss><description>&lt;p&gt;I search the forums and did not see an identical post, but this must be a typical request.&lt;/p&gt;&lt;p&gt;I need to replace&amp;nbsp;all occurances of WordA with&amp;nbsp;WordB inside a field.&lt;/p&gt;&lt;p&gt;I tried this:&lt;/p&gt;&lt;p&gt;concat(substring-before(field, &amp;quot;WordA&amp;quot;), &amp;quot;WordB&amp;quot;, substring-after(field, &amp;quot;WordA&amp;quot;))&lt;/p&gt;&lt;p&gt;The problem I having is &amp;quot;WordA&amp;quot; &lt;strong&gt;may not exist in the string&lt;/strong&gt;, so it returns empty.&lt;/p&gt;</description></item></channel></rss>