ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 10th, 2003, 12:27 PM
Dukeklown Dukeklown is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 40 Dukeklown User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 h 42 m
Reputation Power: 6
Send a message via AIM to Dukeklown Send a message via Yahoo to Dukeklown
Angry Find and replace problems

I have been working on a find and replace feature to speed up my job a little but am having major problems.

I have an access DB that contains the items I am searching for and the list of their respective replacements.

The object is to paste in html code and run the conversion so the script marks up acronyms (strSearch) with their proper <acronym> tags and titles (strReplace).

Let's suppose I have CCOD and CO as search strings. My script goes through and marks up the CCOD section fine and then Marks up the CO portion of CCOD which is not right.

Some one told me to put blank spaces on to the search string to avoid that problem. That worked great i had coded it so that the search string looked like:
strSearch= " " & strSearch & " "
and the replace file looked similar:
strReplace= " " & strReplace & " "
I run the replace() function using vbBinaryCompare as the acronyms are always in capital letters. All went well until I discovered these blank spaces caused another problem.

The reason this is an issue is because sometimes CCOD is actually (CCOD) with the paratheses or CCOD, with the comma, or CCOD- with the hyphen...etc you get the picture right.....

So I have to validate for many functions and seem to be having difficulties with hidden attributes. I had to validate for VbCrlf, VbTab, comma, - , (), etc... and still seems to crap out...

I'm thinking there must be an easier way.
Can someone please point me in another direction or something?

Thanks,

Reply With Quote
  #2  
Old December 11th, 2003, 01:10 AM
imbrokn imbrokn is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2001
Location: NJ
Posts: 428 imbrokn User rank is Corporal (100 - 500 Reputation Level)imbrokn User rank is Corporal (100 - 500 Reputation Level)imbrokn User rank is Corporal (100 - 500 Reputation Level)imbrokn User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 11 h 34 m 8 sec
Reputation Power: 11
Send a message via AIM to imbrokn
This sounds like a job for regular expressions.
http://www.4guysfromrolla.com/webte...pressions.shtml

Reply With Quote
  #3  
Old December 12th, 2003, 09:51 AM
Dukeklown Dukeklown is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 40 Dukeklown User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 h 42 m
Reputation Power: 6
Send a message via AIM to Dukeklown Send a message via Yahoo to Dukeklown
Regular Expressions

Do regular expressions not require VB 5.0 and up ?

All there is on the server is 3.0 and I am not even close to be getting Admin rights.

Are there any other options?

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Find and replace problems


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT