Hi,
I am wondering how to get an id from a Aeva BBC. I just need the id and nothing more. What I want to do is pull the id from the first BBC only in a post.
Here is what I have, it works prefect but it only does ids with 3 digits, if I switch the number to 2 then two digits.
Code: [Select]
RegEx has always thrown me off. I can usually get by trying to make an expression, but I am no expert in this area.
I am wondering how to get an id from a Aeva BBC. I just need the id and nothing more. What I want to do is pull the id from the first BBC only in a post.
Here is what I have, it works prefect but it only does ids with 3 digits, if I switch the number to 2 then two digits.
if (preg_match('[smg id=([0-9]{3})(.+)]', $row['first_body'], $match)) {
$row['aeva_thumb'] = $scripturl . '?action=media;sa=media;in='.$match[1].';thumb';
}
RegEx has always thrown me off. I can usually get by trying to make an expression, but I am no expert in this area.