Got more questions? Find advice on: ASP | SQL | XML | Windows
in Search
Welcome to RegexAdvice Sign in | Join | Help

Acronym Regular Expression

basically an extremely advanced find and replace.

The Mission

Hey guys, I am completely new to regular expressions and I barely know any JavaScript. So I have a mission for you, if you choose to accept.

I need a script that can do the following.

Search between two lines of code (I am writing asp)
From
<!--#include virtual="/_incs/header2_eng.asp"-->
to
<!--#include virtual="/_incs/footer2_eng.asp"-->

And find 'NCE' and replace it with '<acronym title="Networks of Centres of Excellence">NCE</acronym>'
But there are many cases that this NCE can show up for example
' NCE '
'NCE, '
'NCE; '
'NCE. "
' NCE'....
The list continues. And I need to have about 100 different Acronym's. So I basically need a basic template.
My main concern about this is if searching 'NCE ' and the word is 'Once ' then it will do a replace. Which is not what I want. So I hear that regular expressions is the best way to do it.  

Thanks in advanced.

Published Thursday, December 03, 2009 1:45 PM by GingerKid
Filed under: ,

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

Leave a Comment

(required) 
(optional)
(required) 
Enter the code you see below

Submit

This Blog

Syndication

Recent Posts

Tags