Got more questions? Find advice on: ASP | SQL | XML | Windows
in Search
Welcome to RegexAdvice Sign in | Join | Help

Perl regex

Last post 03-10-2010, 6:29 AM by xgoos. 2 replies.
Sort Posts: Previous Next
  •  03-10-2010, 5:55 AM 60640

    Perl regex

    Hallo. I'm trying to build Perl regex for use in php function preg_match_all().
    In text, I'm looking for HTMLtag <div class='editable'>. I'm not iterested in its pair tag </div>. Of course tag can include another informations like <div align='left' class="editable" style='display:'>. Briefly speaking: I'm looking for those div tags which are defined by 'class='editable'' string.
    My best try is /<div.*class=[ '"]editable[ '"][^>]*>/ Bus the first * is so greedy... :(

    Is there somebody who can help me?

    Thx


  •  03-10-2010, 6:19 AM 60641 in reply to 60640

    Re: Perl regex

    <div[^<>]+class=["']?editable["']?[^<>]*+>

    http://portal-vreme.ro
  •  03-10-2010, 6:29 AM 60644 in reply to 60641

    Re: Perl regex

    Thank U very much :)
View as RSS news feed in XML