Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

Dreamweaver & Reg Expressions

 
   Web Hosting and Web Master Forums (Home) -> Webmaster RSS
Next:  Apache mod rewrite rule question  
Author Message
user3397

External


Since: Jan 06, 2005
Posts: 5



(Msg. 1) Posted: Thu Jan 06, 2005 4:35 pm
Post subject: Dreamweaver & Reg Expressions
Archived from groups: alt>www>webmaster (more info?)

Just getting to grips with Regular expressions on dreamweaver.

I it possible to do the following, search for:

subjectX.htm

&

replace it with

newtopicX.htm

Where X is a digit 1-100 - which is bascially the page number.

I did the following regular expression:

subject\d\.htm

which works but how do I get it to replace it with:

newtopicX.htm

Where X is the page number from before ?

 >> Stay informed about: Dreamweaver & Reg Expressions 
Back to top
Login to vote
spamblocked

External


Since: Sep 14, 2004
Posts: 588



(Msg. 2) Posted: Thu Jan 06, 2005 4:35 pm
Post subject: Re: Dreamweaver & Reg Expressions [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <345kcvF42vgdeU1 RemoveThis @individual.net>, 127.0.0.1 RemoveThis @127.0.0.1 says...
 >...
 >I did the following regular expression:
 >
 >subject\d\.htm
 >
 >which works but how do I get it to replace it with:
 >
 >newtopicX.htm


What language is D/W trying to generate?

--
William Tasso ------ read, read again, then post:
<a style='text-decoration: underline;' href="http://www.aww-faq.org/" target="_blank">http://www.aww-faq.org/</a>
<a style='text-decoration: underline;' href="http://www.catb.org/~esr/faqs/smart-questions.html" target="_blank">http://www.catb.org/~esr/faqs/smart-questions.html</a>
<a style='text-decoration: underline;' href="http://groups-beta.google.com/group/alt.www.webmaster" target="_blank">http://groups-beta.google.com/group/alt.www.webmaster</a><!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: Dreamweaver & Reg Expressions 
Back to top
Login to vote
user3397

External


Since: Jan 06, 2005
Posts: 5



(Msg. 3) Posted: Thu Jan 06, 2005 4:35 pm
Post subject: Re: Dreamweaver & Reg Expressions [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

  > >...
  > >I did the following regular expression:
  > >
  > >subject\d\.htm
  > >
  > >which works but how do I get it to replace it with:
  > >
  > >newtopicX.htm
 >
 >
 > What language is D/W trying to generate?
 >


I dont know - im just searching for it in .html with multiple documents
open.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Dreamweaver & Reg Expressions 
Back to top
Login to vote
user3397

External


Since: Jan 06, 2005
Posts: 5



(Msg. 4) Posted: Thu Jan 06, 2005 6:35 pm
Post subject: Re: Dreamweaver & Reg Expressions [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Its OK I found the answer, you have to use rounded brackets as a
backreference.
 >> Stay informed about: Dreamweaver & Reg Expressions 
Back to top
Login to vote
user3397

External


Since: Jan 06, 2005
Posts: 5



(Msg. 5) Posted: Thu Jan 06, 2005 7:35 pm
Post subject: Re: Dreamweaver & Reg Expressions [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Opps forgot to mention this was using reg. expressions.

I couldnt get Dreamweaver to insert the back reference using rounded
brackets into the
document..
 >> Stay informed about: Dreamweaver & Reg Expressions 
Back to top
Login to vote
af380

External


Since: Sep 17, 2004
Posts: 284



(Msg. 6) Posted: Thu Jan 06, 2005 9:35 pm
Post subject: Re: Dreamweaver & Reg Expressions [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Thu, 6 Jan 2005 127.0.0.1.RemoveThis@127.0.0.1 wrote:

 > Just getting to grips with Regular expressions on dreamweaver.
 >
 > I it possible to do the following, search for:
 >
 > subjectX.htm
 >
 > &
 >
 > replace it with
 >
 > newtopicX.htm
 >
 > Where X is a digit 1-100 - which is bascially the page number.
 >
 > I did the following regular expression:
 >
 > subject\d\.htm
 >
 > which works but how do I get it to replace it with:

That should find "subject0.htm", "subject1.htm", "subject2.htm",
"subject3.htm", "subject4.htm", "subject5.htm", "subject6.htm",
"subject7.htm", "subject8.htm" and "subject9.htm" but not
"subject10.htm" to "subject999.htm". You're only looking for
one digit. \d+ would look for any number of digits and \d{1,3}
would look for one to three digits.

 >
 > newtopicX.htm
 >
 > Where X is the page number from before ?

With Regular Expressions selected, try searching for:

subject(\d+)\.htm
^^^^^ <------------ subexpression # 1 (one or more digits)

and replacing it with:

newtopic$1.htm
^^ <-------------- uses contents of subexpression # 1.

References that might help:
<a style='text-decoration: underline;' href="http://livedocs.macromedia.com/dreamweaver/mx2004/using/22_codi9.htm" target="_blank">http://livedocs.macromedia.com/dreamweaver/mx2004/using/22_codi9.htm</a>
<a style='text-decoration: underline;' href="http://www.bu.edu/webcentral/learning/dreamweaver2/findandreplace-expressions.html" target="_blank">http://www.bu.edu/webcentral/learning/dreamweaver2/findandreplace-expr...ions.ht</a>

Norman "who admits he knows *nothing* about Dreamweaver but
can often get very lucky using search engines" De Forest
--
Norman De Forest <a style='text-decoration: underline;' href="http://www.chebucto.ns.ca/~af380/Profile.html" target="_blank">http://www.chebucto.ns.ca/~af380/Profile.html</a>
af380.RemoveThis@chebucto.ns.ca [=||=] (A Speech Friendly Site)
"O'Reilly is to a system administrator as a shoulder length latex glove
is to a veterinarian." -- Peter da Silva in the scary devil monastery<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Dreamweaver & Reg Expressions 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Looking for Hosting - Hi, I'm looking for a hosting service. It has to have: - as much bandwidth as possible (in case the site turns popular) - between 50 and 100 mb of storage space - 30 mb is great too. - multiple domain names (sometimes called domain add-ons, so I can hos...

problems at myshosting.com - What do you do with problems at myshosting.com? Waiting for the fix or moving somewhere else? Mark

Background colour evangelism - Submitted for your approval: <body style="background-color:#ffffff;"> Not so hard, right? However, many designers neglect it because they assume everyone is using white as their default background colour. Or they test their pages on...

browser compatibility problem - Hallo everyone. The website I am finishing off is www.tecnolingueitalia.com . I have created some css buttons for navigation with dhtml effects. Now, the javascript and the css seem to work fine in all browsers checked so far (IE 5.5. onwards, NS 4.7..

Webmasters ressources - Hello, I present to you a directorie of resources for webmasters. The major part of the sites suggested are French-speaking. The English sites are accepted. http://search.referencement-fr.com Thanks for making known me your best sites in this field. ...
   Web Hosting and Web Master Forums (Home) -> Webmaster All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]