www.webdeveloper.com
Results 1 to 2 of 2

Thread: Regular Expression to replace string

  1. #1
    Join Date
    Aug 2003
    Posts
    20

    Regular Expression to replace string

    Hi,

    I have an XML string that has something as follows:

    ?>#carriagereturn##newline#<form>

    I want to basically remove everything that is inside ?> and <form>. How can I do this using regular expressions?

  2. #2
    Join Date
    Jan 2004
    Posts
    72
    Code:
    string.replace( /\?>(?:(?:.|\r\n)*)<form>/i , "?><form>" )
    That should work.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles