Go Back   CodingForums.com > :: Client side development > General web building

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Old 11-07-2009, 04:25 PM   PM User | #1
jdblewitt
New Coder

 
Join Date: Sep 2006
Posts: 23
Thanks: 6
Thanked 0 Times in 0 Posts
jdblewitt is an unknown quantity at this point
Dreamweaver Regular Expression Help

Hello,

I'm having trouble figuring out how to comment out a script I have on many pages of my site. The script looks like...

Code:
<script type="text/javascript" src="http://media.trafficregenerator.com/js/jdblewitt/Zane/trafficregenerator.js"></script>
Now on each page the "Zane" part of the URL changes. I have no problem finding these scripts using [^"]* in place of Zane...

Code:
<script type="text/javascript" src="http://media.trafficregenerator.com/js/jdblewitt/[^"]*/trafficregenerator.js"></script>
What would I put in the replace box to wrap these scripts in comment tags
Code:
<!--<script type="text/javascript" src="http://media.trafficregenerator.com/js/jdblewitt/Zane/trafficregenerator.js"></script>-->
I tried putting the same in the replace box as the find box but it replaced with the actual wild card symbols. Any help would be great. Thanks
jdblewitt is offline   Reply With Quote
Old 11-07-2009, 04:33 PM   PM User | #2
abduraooft
Master Coder

 
abduraooft's Avatar
 
Join Date: Mar 2007
Location: God's own country
Posts: 8,976
Thanks: 142
Thanked 1,192 Times in 1,184 Posts
abduraooft is a jewel in the roughabduraooft is a jewel in the roughabduraooft is a jewel in the roughabduraooft is a jewel in the rough
Try
Code:
<script type="text/javascript" src="http://media.trafficregenerator.com/js/jdblewitt/(.*)/trafficregenerator.js"></script>
Code:
<!--<script type="text/javascript" src="http://media.trafficregenerator.com/js/jdblewitt/$1/trafficregenerator.js"></script> -->
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)
abduraooft is offline   Reply With Quote
Users who have thanked abduraooft for this post:
jdblewitt (11-08-2009)
Old 11-08-2009, 01:24 AM   PM User | #3
jdblewitt
New Coder

 
Join Date: Sep 2006
Posts: 23
Thanks: 6
Thanked 0 Times in 0 Posts
jdblewitt is an unknown quantity at this point
That's it, thanks a bunch!
jdblewitt is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:05 AM.

Home - Contact Us - Archives - Link to CF - Resources - Top 

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.