#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2003
    Posts
    54
    Rep Power
    12

    regular expressions


    Hi. Let's say I have something like this,

    Code:
    <p class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: center" align=center>some text</p>
    and what I ultimately want to end up with is this,

    Code:
    <p>some text</p>
    I've been trying to figure out what regular expression to use in the rereplacenocase function to replace with "<p>" but just can't seem to get it right. Can anyone help? Thanks.
  2. #2
  3. No Profile Picture
    Moderator

    Join Date
    Jun 2002
    Location
    Raleigh, NC
    Posts
    5,273
    Rep Power
    968
    I'm no regex guru, but maybe tell it to replace everything that matches this:

    '<p[^>]*'

    with just this: '<p'

IMN logo majestic logo threadwatch logo seochat tools logo