• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 579
  • Last Modified:

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

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
Fern2
Asked:
Fern2
  • 2
1 Solution
 
Dain_AndersonCommented:
Try this;

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

HTH,

-Dain
0
 
Dain_AndersonCommented:
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
 
Fern2Author Commented:
Thx a million
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now