Hi all!
I'm trying to create a regular expression to replace all lines, similar to the following:
<% PageTitle = "Blah" %>
With:
<title>Blah</title>
The content of the PageTitle variable, "Blah" in this example, should remain untouched. I've spent God knows how long trying all sorts of expressions to do this with no luck.
Is it possible? If so, how?
JC
Problems Replacing ASP Tags
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
Roy Beatty
Re: Problems Replacing ASP Tags
Find:::: ^<% PageTitle = "\(.+\)" %> *$<br>
Replace: <title>\1</title>
The ^ in the Find regex anchors the expression to the start of a line. The $ anchors it to the end. The " *" permits trailing blanks.
If the expression occurs in the midlle of some lines, then leave off the anchors and the trailing-blanks pattern.
HTH, Roy
Replace: <title>\1</title>
The ^ in the Find regex anchors the expression to the start of a line. The $ anchors it to the end. The " *" permits trailing blanks.
If the expression occurs in the midlle of some lines, then leave off the anchors and the trailing-blanks pattern.
HTH, Roy
-
JC
Re: Problems Replacing ASP Tags
Thank you ever so much!
I was certain I had the basic jist of it all but it seems I need to study my expression syntax a little more.
Again thank you.
JC
I was certain I had the basic jist of it all but it seems I need to study my expression syntax a little more.
Again thank you.
JC