|
|
Subject:
Using regular expressions in Homesite 5.0 extended replace feature
Category: Computers > Programming Asked by: mrbula-ga List Price: $25.00 |
Posted:
07 Jun 2003 20:18 PDT
Expires: 07 Jul 2003 20:18 PDT Question ID: 214551 |
Using regular expressions in Homesite 5.0's extended replace feature, I want to delete all characters (including tags) up to (but not including) the first occurrence of the word "foo." I do not know what characters or tags will precede "foo." What regular expression string should I use to achieve this? |
|
Subject:
Re: Using regular expressions in Homesite 5.0 extended replace feature
Answered By: webadept-ga on 07 Jun 2003 23:10 PDT Rated: |
Hi, Regular Expressions are very cool by the way, and they save a tone of time. So in this example line : <br><p><img src=mypic.jpg>My Summer home called Foo House</p> <hr> we want this replaced to read : <p>My Summer home. The Foo House</p> To do this with a regular expression [A-Za-z0-9_ ><.="']*Foo In the search and what you want to replace it with in the Replace box What this means is [A-Za-z0-9_ ><.="'] == These Characters.. any of them in any combination * = As many as you find Foo == in front of this set of character This interpreter they have for the Homesite program is a little disappointing. I have to admit I got rather excited that they had this now and didn't mind downloading the demo version to see it in action. But the examples are rather pour and the expressions themselves don't act quite right. I wish I could find some better documentation for you on how Regular expressions work. There are a number of pages out there, but they aren't quite right for this apt. One, which I think is very well written is http://www.anaesthetist.com/mnm/perl/regex.htm Maybe you can gleen something useful from that. Anyway, good luck and I'm glad I could help you this far at least. webadept-ga | |
|
mrbula-ga
rated this answer:
This was enough to get me where I needed to go. Thanks! |
|
There are no comments at this time. |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |