Connecting Tech Pros Worldwide Help | Site Map

make a regex

  #1  
Old March 15th, 2008, 09:55 PM
dbdariusz
Guest
 
Posts: n/a
Hi

input:
<!-- comment -- <script><!-- comment --</scritp <!--
comment -->

output:
<script><!-- comment --></scritp>


Now I can find just every comment:
<!--.*?-->

maybe sombody help me..thx
  #2  
Old March 16th, 2008, 07:05 PM
Mason Barge
Guest
 
Posts: n/a

re: make a regex



"dbdariusz" <dbdariusz@gmail.comwrote in message
news:be23801f-17cf-49b7-b458-3f105b7c9677@s19g2000prg.googlegroups.com...
Quote:
Hi
>
input:
<!-- comment -- <script><!-- comment --</scritp <!--
comment -->
>
output:
<script><!-- comment --></scritp>
>
>
Now I can find just every comment:
<!--.*?-->
>
maybe sombody help me..thx
OK, first a little scolding, LOL. This isn't written as a PHP question and
even if it were, you would have to specify what flavor of regex you are
using.

It really should be reasonably easy to do if you understand how to use
possessive quantifiers. IIRC, PCRE is better/easier for possessive
quantifiers than POSIX, although I don't know much about POSIX.

Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
How make regex that means "contains regex#1 but NOT regex#2" ?? seberino@spawar.navy.mil answers 4 July 1st, 2008 04:15 PM
Regex to remove \t \r \n from string morleyc@gmail.com answers 15 May 20th, 2007 08:25 PM
How to make Regex.Replace faster? Morgan Cheng answers 4 September 15th, 2006 06:45 PM
Regex Vb.net question Chris answers 5 December 13th, 2005 09:45 PM
Which RegEx Testing Tool Do You Prefer? clintonG answers 17 November 19th, 2005 09:05 PM