Heyyy
I was trying to get the text between the '.' and ']' and also the text between the two ":
PHP Code:
$html = '[ACCESSORY_IDs.ACCESSORY_GOGGLES] = "_°í±Û"';
preg_match_all('/(s.)(.*?)]/', $html, $matches, PREG_SET_ORDER);
foreach ($matches as $val) {
echo "matched: " . $val[0] . "<br>";
echo "part 1: " . $val[1] ."<br>";
echo "part 2: " . $val[2] ."<br>";
echo "part 3: " . $val[3] ."<br>";
echo "part 4: " . $val[4] ."<br><br>";
}
the code outputs
Quote:
matched: s.ACCESSORY_GOGGLES]
part 1: s.
part 2: ACCESSORY_GOGGLES
|
along with multiple errors but the errors are expected
I tried to look for a tutorial about the patterns but I haven't found any, I guess I was too dumb to find one. :x
can someone help me or teach me please?