Connecting Tech Pros Worldwide Help | Site Map

make a regex

 
LinkBack Thread Tools Search this Thread
  #1  
Old March 15th, 2008, 08:55 PM
dbdariusz
Guest
 
Posts: n/a
Default make a regex

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, 06:05 PM
Mason Barge
Guest
 
Posts: n/a
Default 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.

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.