473,698 Members | 2,298 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="DisplaySo rtableTickets.a sp?SearchYes=tr ue&amp;selectTS E=200&amp;Assis t
Emp=&amp;Status =&amp;Environme nt=&amp;Custome rCode=&amp;date 1=&amp;date2=&a m
p;DateSearch=&a mp;Sort=TKTID&a mp;SortToggle=1 &amp;ReportType =&amp;ShowInter n
al=&amp;ShowExt ernal=&amp;sear chtext=&amp;Sea rchSDR=&amp;Sea rchCustTicketID =
&amp;RootCauseI D=&amp;CauseMat chType=">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 2670
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**********@s pammotel.com> wrote in message
news:#f******** ******@TK2MSFTN GP10.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**********@s pammotel.com> wrote in message
news:eL******** ******@TK2MSFTN GP12.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********@ver ywarmmail.com> wrote in message
news:es******** ******@tk2msftn gp13.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****@thankyo u.com> wrote in message
news:#M******** ******@TK2MSFTN GP14.phx.gbl...
"middletree " <mi********@ver ywarmmail.com> wrote in message
news:es******** ******@tk2msftn gp13.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********@HTO mail.com> wrote in message
news:%2******** *******@TK2MSFT NGP12.phx.gbl.. .
"Chris Hohmann" <no****@thankyo u.com> wrote in message
news:#M******** ******@TK2MSFTN GP14.phx.gbl...
"middletree " <mi********@ver ywarmmail.com> wrote in message
news:es******** ******@tk2msftn gp13.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****@thankyo u.com> wrote in message
news:#G******** ******@TK2MSFTN GP10.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********@ver ywarmmail.com> wrote in message
news:OI******** ******@TK2MSFTN GP09.phx.gbl...
"Chris Hohmann" <no****@thankyo u.com> wrote in message
news:#G******** ******@TK2MSFTN GP10.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
6019
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
3956
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 open all four PPT files at once, and would loop through queriers for ever client and create custom presentations. Now there are 8 files, nearly 500 slides and the computer is bogging down with trying to open them all at once. I know that Access...
0
466
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 code, the last hyperlink that was clicked is the only one that displays. Background: The database is for providing instruction documentation for shop-floor personnel in a manufacturing environment. The main purpose of the database is to provide...
4
4242
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
2371
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 to the desired file and paste the hyperlink on the form (which obviously remains for on all the records). I am trying to create a
1
3643
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 BACKGROUND: I created a folder "Document Library" on my local drive, which contains document sub-folders and the database. For referential integrity, I designed the database with relative hyperlinks (e.g. Folder\File.pdf). The hyperlinks worked perfectly...
1
1939
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 by someone else whenever the links change. However, I don't always want to have to manually update my links whenever the spreadsheet is changed. Instead of manually updating 100's of hyperlinks, I would like to create a macro or something that will...
3
2867
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 mulitple is visible. the problem is when i call step1 again, it does not hide single and multiple hyperlinks. any idea to solve my problem? thanks in advance! below is my sample script... function Step1() {...
12
5582
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 of hyperlinks that link to files on the shared drive. I CANNOT get the hyperlinks to be assigned. I can change the field name, but not the hyperlink address. Can't figure it out. 1) I have a header row 2) Column 16 is where the hyperlinks are...
0
8598
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9152
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8885
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5857
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4358
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4612
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3037
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2320
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1995
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.