replace words with bold words

Discussion in 'ASP General' started by Lasse Edsvik, Oct 5, 2003.

  1. Lasse Edsvik

    Lasse Edsvik Guest

    Hello

    I was wondering if you guys could help me solve this using reg exp,

    i have a searchpage and a variable keywords that holds a number of words.


    e.g

    keywords = "test car goose"

    ......
    <%
    do until rs.eof
    %>

    <%=rs("text")%>

    and i was wondering if you guys know how to make the words test, car and
    goose bold if exists in rs("text")?

    /Lasse
     
    Lasse Edsvik, Oct 5, 2003
    #1
    1. Advertisements

  2. and i was wondering if you guys know how to make the words test, car and
    http://www.aspfaq.com/2344
     
    Aaron Bertrand [MVP], Oct 5, 2003
    #2
    1. Advertisements

  3. Lasse Edsvik

    Tim Guest

    what's the point in posting a link that doesn't work properly?
    why not just answer the question?
    I know you want to drive lots of traffic to your site but it doesn't seem to
    be the most user-freindly way of replying.


    Tim
     
    Tim, Oct 6, 2003
    #3
  4. Lasse Edsvik

    Bob Barrows Guest

    The link works fine for me.

    Granted, this syntax would probably have been safer:
    http://www.aspfaq.com/show.asp?id=2344

    but the link Aaron provided should have worked. What happens when you click
    it?
    Why not post a link if it contains the answer to the question. That's the
    purpose of creating a FAQ, isn't it? So people asking FAQ's can be directed
    to the page containing the answer ...

    We answer hundreds of questions every day. We should not be criticized for
    using time-savers such as posting links to relevant pages.
    It's the old saying: if I give a fish to a hungry person, he has dinner for
    that evening. If I teach him to fish, he has dinner for the rest of his
    life.

    By directing a person to a FAQ site, or to the results of a Google search,
    we are making the person aware that there are resources available whch he
    either overlooked, or was not aware of, resources which will probably get
    him answers to his questions much quicker than can be expected from a
    newsgroup, where questions can be left unanswered for hours, even days if no
    one notices them.

    Bob Barrows
     
    Bob Barrows, Oct 6, 2003
    #4
  5. what's the point in posting a link that doesn't work properly?

    What does "doesn't work properly" mean?
    Because it's been answered before, and I don't think I should waste time
    constructing the exact same answer over and over again when, instead, I can
    point the user to a link and answer any follow-up questions. And the time I
    *didn't* spend constructing the same answer from scratch, I can use to
    answer five other questions instead.
    Really? What would I get out of that? There are no advertisements, the
    site is free, and there is no tangible benefit to "drive lots of traffic"
    there... except that more traffic means a potentially more expensive hosting
    bill due to bandwidth consumption and database usage. So, yes, you must be
    right, I just want to drive traffic to my web site.
    That may be your opinion. Based on the feedback (and donations) I get from
    my *free* and *ad-free* web site, I would guess that you're in the minority.

    You're new around here, huh?
     
    Aaron Bertrand - MVP, Oct 6, 2003
    #5
  6. Lasse Edsvik

    Adrienne Guest

    When I use www.aspfaq.com/2344 it goes to wholelist.asp. This might be
    because I use Opera, and maybe the site is doing some kind of browser
    sniffing so I don't get the nice menu on the side.

    No biggie, though. I just type the article in Opera's search box, and jump
    right to it, although I _would_ like to have the nice menu on the side.
     
    Adrienne, Oct 6, 2003
    #6
  7. It behaves the same way here. If you change quick preferences to
    identify as IE 6 then the site appears as intended.
     
    Stefan Berglund, Oct 6, 2003
    #7
  8. Lasse Edsvik

    Tim Guest

    no - not new - far from it - just in the mood for questioning the things we
    take for granted. a bit of a habit of mine I'm afraid.
    by the way - your site doesn't pick me up as an IE user as I have modified
    my browser header to make me look like an Amiga - and I forgot. sorry!
    Don't you cater for Amigas? (joke by the way)

    ps - a slight contradiction in your answer
    compare
    "There are no advertisements, the site is free, and there is no tangible
    benefit to drive lots of traffic there"
    with
    "Based on the feedback (and donations) I get..."

    don't forget the ego thing as well. we all have sites we do for free, we
    just like to feel popular. did you have a disturbed childhood?


    cheers ;-)

    Tim
     
    Tim, Oct 7, 2003
    #8
  9. ps - a slight contradiction in your answer

    I disagree completely.
    Obviously the latter are the people who appreciate the site, rather than
    make snide comments about it. Just driving traffic there does not =
    donations.
     
    Aaron Bertrand [MVP], Oct 7, 2003
    #9
  10. Lasse Edsvik

    Tim Guest

    I seem to have touched a nerve - sorry - didn't mean to.



    Tim
     
    Tim, Oct 7, 2003
    #10
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.