replace words with bold words

L

Lasse Edsvik

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
 
T

Tim

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
 
B

Bob Barrows

Tim said:
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
 
A

Aaron Bertrand - MVP

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

Adrienne

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

Stefan Berglund

in said:
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.
 
T

Tim

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
 
A

Aaron Bertrand [MVP]

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.
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,835
Latest member
KetoRushACVBuy

Latest Threads

Top