[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Regular expression "Replace <p> and </p>

Posted on 2005-05-13
3
Medium Priority
?
574 Views
Last Modified: 2013-12-24
Hi.

How can I replace  <P and whatever text MS word puts here> with "" (nothing)
and
How can I replace </P> with "<br><br>" with Regular expression?

Regards, Fern
0
Comment
Question by:Fern2
  • 2
3 Comments
 
LVL 9

Expert Comment

by:Dain_Anderson
ID: 13998164
Try this;

<CFSET Content = REReplaceNoCase(Content, "<p([^>]*)>", "<br><br>", "ALL")>

HTH,

-Dain
0
 
LVL 9

Accepted Solution

by:
Dain_Anderson earned 2000 total points
ID: 13998173
Sorry, didn't read it all the way. Try this:

<CFSET Content = REReplaceNoCase(Content, "<p([^>]*)>", "<p>", "ALL")>
<CFSET Content = REReplaceNoCase(Content, "</p>", "<br><br>", "ALL")>

Or, you could change both <p> and </p> to <br><br> with:

<CFSET Content = REReplaceNoCase(Content, "</?p([^>]*)>", "<br><br>", "ALL")>

-Dain
0
 
LVL 1

Author Comment

by:Fern2
ID: 13998268
Thx a million
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question