Questions tagged as 'preg-match'

1
answer

How to use preg_match_all in this section?

<div> <span class="dark_text">Type:</span> <a href="https://myanimelist.net/topanime.php?type=var1">var2</a></div>~ I need to make preg match all the variable var2 regardless of what is wri...
asked by 03.06.2017 / 18:19
1
answer

Is denying access even with normal characters

This command line is not letting my form access the database even with all normal characters. Anyone who understands more than preg_match can help me? if(!preg_match("/^[a-zA-Z]*$",$name)||!preg_match("/^[a-zA-Z]*$",$title)||!preg_match...
asked by 30.08.2017 / 05:49
1
answer

Display content of the title tag of the current page using PHP

Hello, I'd like some help modifying the code below: <?php function page_title($url) { $fp = file_get_contents($url); if (!$fp) return null; $res = preg_match("/<title>(.*)<\/title>/siU", $fp, $title_matches)...
asked by 09.08.2016 / 01:11
1
answer

Transform elements of a string into array PHP [closed]

mysql returns the following string: ["Element1", "Element2", "Element3", "Element4", "Element5", "Element6"] I need to transform each of the words between "" into an element of an array. I tried from the preg_split and preg_match_all function...
asked by 18.12.2018 / 04:58