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. Advertising

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


    http://www.aspfaq.com/2344
     
    Aaron Bertrand [MVP], Oct 5, 2003
    #2
    1. Advertising

  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


    "Aaron Bertrand [MVP]" <> wrote in message
    news:...
    > > and i was wondering if you guys know how to make the words test, car and
    > > goose bold if exists in rs("text")?

    >
    > http://www.aspfaq.com/2344
    >
    >
     
    Tim, Oct 6, 2003
    #3
  4. Lasse Edsvik

    Bob Barrows Guest

    Tim wrote:
    > what's the point in posting a link that doesn't work properly?


    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 just answer the question?

    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.

    > 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.
    >

    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?

    > why not just answer the question?


    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.

    > I know you want to drive lots of traffic to your site


    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.

    > but it doesn't seem to
    > be the most user-freindly way of replying.


    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

    Gazing into my crystal ball I observed "Bob Barrows"
    <> writing in
    news::

    >> what's the point in posting a link that doesn't work properly?

    >
    > 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?
    >
    >


    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 Boswell
    Please respond to the group so others can share
    http://www.arbpen.com
     
    Adrienne, Oct 6, 2003
    #6
  7. On Mon, 06 Oct 2003 21:54:48 GMT, Adrienne <>
    wrote:
    in <Xns940C97BDD3A13arbpenyahoocom@207.115.63.158>

    >Gazing into my crystal ball I observed "Bob Barrows"
    ><> writing in
    >news::
    >
    >>> what's the point in posting a link that doesn't work properly?

    >>
    >> 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?
    >>
    >>

    >
    >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.


    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




    "Aaron Bertrand - MVP" <> wrote in message
    news:...
    > > what's the point in posting a link that doesn't work properly?

    >
    > What does "doesn't work properly" mean?
    >
    > > why not just answer the question?

    >
    > 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.
    >
    > > I know you want to drive lots of traffic to your site

    >
    > 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.
    >
    > > but it doesn't seem to
    > > be the most user-freindly way of replying.

    >
    > 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?
    >
    >
     
    Tim, Oct 7, 2003
    #8
  9. > ps - a slight contradiction in your answer

    I disagree completely.

    > "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..."


    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


    "Aaron Bertrand [MVP]" <> wrote in message
    news:...
    > > ps - a slight contradiction in your answer

    >
    > I disagree completely.
    >
    > > "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..."

    >
    > Obviously the latter are the people who appreciate the site, rather than
    > make snide comments about it. Just driving traffic there does not =
    > donations.
    >
    >
     
    Tim, Oct 7, 2003
    #10
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Peter Strøiman
    Replies:
    1
    Views:
    2,110
    Peter Strøiman
    Aug 23, 2005
  2. Richard Heathfield
    Replies:
    7
    Views:
    380
    Barry Schwarz
    Oct 5, 2003
  3. utab

    Words Words

    utab, Feb 16, 2006, in forum: C++
    Replies:
    6
    Views:
    436
    Daniel T.
    Feb 16, 2006
  4. BerlinBrown
    Replies:
    6
    Views:
    4,643
  5. Mark Toth
    Replies:
    3
    Views:
    141
    Mark Toth
    Dec 30, 2007
Loading...

Share This Page