Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
TeamSite
TeamSite, LiveSite and OpenDeploy
tpl Perl line to modify URLS
System
tpl code to replace links is not making a global replace even though I am using the /g option.
example line:
<a href="/private/path/file1.html">link to file1</a><a href="/private/path/file2.html>link to file2</a>
Perl statement in TPL to output string with replaced hrefs:
$dcrPara =~ s/href=\"\/private(.*).html\"/href=\"\/injectJSPpath\/private\/injectJSPvirtual$1\.html\"/g;
Result:
<a href="/injectJSPpath/private/path/injectJSPvirtual/file1.html">link to file1</a><a href="/private/path/file2.html>link to file2</a>
The second link is not getting manipulated by the perl statement. If I put a line break in the content between the two links then both links get modified. Can someone see an issue with my perl statement and provide advice?
Find more posts tagged with
Comments
There are no comments yet