Thread: php regex help
i trying parse webpage , read few tags. example, have many <form> tags in page , want specific tag having specific id, "loginform"
i want read part.html code:<form id="loginform" style="margin:0px;" action="targetpage.php" method="post">
created pattern preg_match:
well, when test works fine, if there multiple forms, selects 1 having "loginform" id.php code:$pattern = '/\<form[.\s]*(id="loginform")+[^\>]*\>/i';
when try on actual page, fails. may reason is, actual page may contain newline characters, not sure, can tell me how overcome problem?
in advance.
Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk [SOLVED] php regex help
Ubuntu

Comments
Post a Comment