Regex to find name and id from the string in php e.g [ads id=432]
===

I am in need of a regex that can find the brackets from a certain string and extract the value of id from it. e.g

$string = "Hey how are you, this is [ads id=432] going to be fun!";

i need name like ads and id like 432.