473,408 Members | 2,405 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

remove hyperlinks?

I have a page which takes data in an HTML table, and exports it to an Excel
file. It works fine, but I want several things about the spreadsheet to look
different from the HTML version. Things like fonts and colors. I think I can
use a style sheet for the latter, but I haven't figured out how to remove
hyperlinks from some of the items. On the HTML page, the hyperlinks are
useful, but I don't want the spreadsheet to have them.

So on my ASP page which builds the Excel file, I have this:

<TH vAlign=top align=left width="7%"><A
href="DisplaySortableTickets.asp?SearchYes=true&am p;selectTSE=200&amp;Assist
Emp=&amp;Status=&amp;Environment=&amp;CustomerCode =&amp;date1=&amp;date2=&am
p;DateSearch=&amp;Sort=TKTID&amp;SortToggle=1&amp; ReportType=&amp;ShowIntern
al=&amp;ShowExternal=&amp;searchtext=&amp;SearchSD R=&amp;SearchCustTicketID=
&amp;RootCauseID=&amp;CauseMatchType=">TKT ID:</A></TH>

How can I use ASP to remove the opening and closing <A> tags? A replace
function won't work, because it's different every time.
Jul 22 '05 #1
9 2658
middletree wrote:
How can I use ASP to remove the opening and closing <A> tags? A
replace function won't work, because it's different every time.


Isn't that the whole point of pattern matching?

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 22 '05 #2
What is pattern matching?
"Dave Anderson" <GT**********@spammotel.com> wrote in message
news:#f**************@TK2MSFTNGP10.phx.gbl...
middletree wrote:
How can I use ASP to remove the opening and closing <A> tags? A
replace function won't work, because it's different every time.
Isn't that the whole point of pattern matching?

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message.

Use of this email address implies consent to these terms. Please do not contact me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.

Jul 22 '05 #3
middletree wrote:
What is pattern matching?


It's a codified way of doing what you already do when you manually strip the
HTML from a piece of text. Both VBScript and JScript allow you to do this
with Regular Expression Objects:

http://msdn.microsoft.com/library/en...sobjRegExp.asp
http://msdn.microsoft.com/library/en...expression.asp

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 22 '05 #4
I looked over both articles, and am still not clear on what this has to do
with what I am asking about.
"Dave Anderson" <GT**********@spammotel.com> wrote in message
news:eL**************@TK2MSFTNGP12.phx.gbl...
middletree wrote:
What is pattern matching?
It's a codified way of doing what you already do when you manually strip

the HTML from a piece of text. Both VBScript and JScript allow you to do this
with Regular Expression Objects:

http://msdn.microsoft.com/library/en...sobjRegExp.asp
http://msdn.microsoft.com/library/en...jregexpression
..asp
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use of this email address implies consent to these terms. Please do not contact me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.

Jul 22 '05 #5
"middletree" <mi********@verywarmmail.com> wrote in message
news:es**************@tk2msftngp13.phx.gbl...
[snip]
How can I use ASP to remove the opening and closing <A> tags? A replace
function won't work, because it's different every time.


<%
Dim s, re
s = "<a href='test.html'>Hello World.</a>"
Set re = New RegExp
re.Global = True
re.IgnoreCase = True
re.Pattern = "<a .*?>(.*?)</a>"
Response.Write re.Replace(s,"$1")
%>
Jul 22 '05 #6
Now that's something I can understand.

Thanks!
"Chris Hohmann" <no****@thankyou.com> wrote in message
news:#M**************@TK2MSFTNGP14.phx.gbl...
"middletree" <mi********@verywarmmail.com> wrote in message
news:es**************@tk2msftngp13.phx.gbl...
[snip]
How can I use ASP to remove the opening and closing <A> tags? A replace
function won't work, because it's different every time.


<%
Dim s, re
s = "<a href='test.html'>Hello World.</a>"
Set re = New RegExp
re.Global = True
re.IgnoreCase = True
re.Pattern = "<a .*?>(.*?)</a>"
Response.Write re.Replace(s,"$1")
%>

Jul 22 '05 #7

"middletree" <mi********@HTOmail.com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
"Chris Hohmann" <no****@thankyou.com> wrote in message
news:#M**************@TK2MSFTNGP14.phx.gbl...
"middletree" <mi********@verywarmmail.com> wrote in message
news:es**************@tk2msftngp13.phx.gbl...
[snip]
> How can I use ASP to remove the opening and closing <A> tags? A replace
> function won't work, because it's different every time.


<%
Dim s, re
s = "<a href='test.html'>Hello World.</a>"
Set re = New RegExp
re.Global = True
re.IgnoreCase = True
re.Pattern = "<a .*?>(.*?)</a>"
Response.Write re.Replace(s,"$1")
%>


Now that's something I can understand.

Thanks!

Actually, in the long run, Dave's tactic is more worthwhile. He was trying
to bring you close enough to the answer so you could make the mental leap
for yourself. I GAVE you a fish, he tried to TEACH you how to fish. There a
world of difference between the two.
Jul 22 '05 #8
"Chris Hohmann" <no****@thankyou.com> wrote in message
news:#G**************@TK2MSFTNGP10.phx.gbl...
Actually, in the long run, Dave's tactic is more worthwhile. He was trying
to bring you close enough to the answer so you could make the mental leap
for yourself. I GAVE you a fish, he tried to TEACH you how to fish. There

a world of difference between the two.


I totally understand. But it was so far above my head, covering several
things I have never seen before, that I couldn't make the leap. Your
example, combined with what I read in the articles referenced in his post,
have worked together quite well.
Jul 22 '05 #9
"middletree" <mi********@verywarmmail.com> wrote in message
news:OI**************@TK2MSFTNGP09.phx.gbl...
"Chris Hohmann" <no****@thankyou.com> wrote in message
news:#G**************@TK2MSFTNGP10.phx.gbl...
>

Actually, in the long run, Dave's tactic is more worthwhile. He was
trying
to bring you close enough to the answer so you could make the mental leap
for yourself. I GAVE you a fish, he tried to TEACH you how to fish. There

a
world of difference between the two.


I totally understand. But it was so far above my head, covering several
things I have never seen before, that I couldn't make the leap. Your
example, combined with what I read in the articles referenced in his post,
have worked together quite well.

I'm glad we could help. :)
Jul 22 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Ed | last post by:
Don't even know if this is a javascrip thing...but how do I remove the underline from hyperlinks?
6
by: Colleyville Alan | last post by:
I have an application that has an Access table that stores the locations of slides in a Powerpoint file. This used to work fine when there were about 4 files and 200 slides. The database would...
0
by: Tim | last post by:
Access 97: I have a table with a hyperlink field that I display on a form. I can click on the form field and the hyperlink activates correctly. However, if I try to activate the hyperlink using VB...
4
by: Seefor | last post by:
Hi, I want my text hyperlinks to have a dotted border underneath, so I did this which works fine: a, a:link, a:visited, a:hover, a:active { color: #000; text-decoration: none;
1
by: Robin | last post by:
Hello! I'm having trouble with links and hyperlinks in MS Access 2003 - any help would be great! Question 1! The "insert hyperlink" icon opens a browser window, allows the user to browse...
1
by: Janna | last post by:
Hello tech savvy gurus! I hope someone can help me! THE PROBLEM: "Cannot open specified file" when I click on a hyperlink in an Access database when it is located on our server. THE...
1
by: mforema | last post by:
Hi Everybody, I have an Access table with a field filled with outdated hyperlinks. I also have an excel spreadsheet that is the master list for these hyperlinks. The spreadsheet will be updated...
3
by: prinsipe | last post by:
Hi all, what i'm doing is showing/hiding hyperlinks depending on the hyperlink clicked. it is partially working. when i call step1, all hyperlinks are hidden. but then i call step2, single and...
12
by: Frustratee | last post by:
Sorry guys, this is killing me. I have been fighting this issue for several weeks, to no avail. I am exporting the results of a query to an excel sheet, with one of the columns being from a field...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.