<p>I have a regexp I'm using with sed, but now I need to make it work in PHP also. I can't use system calls as they are disabled.</p>

<pre>
$ cat uglynumber.txt:
Ticket number : 303905694, FOO:BAR:BAR: Some text
Case ID:123,456,789:Foobar - Some other text
303867970;[FOOBAR] Some text goes here
Case Ref: 303658850 - Some random text here - host.tld #78854w
</pre>

<pre>
$ cat uglynumbers.txt | sed "s/[, ]//g;s/.*\([0-9]\{9\}\).*/\1/g"
303905694
123456789
303867970
303658850
</pre>

<p>So, how to do the same with PHP?</p>

<p>I found one example like this, but I can't inject that regexp into that.</p>

<pre>
if (preg_match("/.../", $line, $matches)) {
  echo "Match was found";
  echo $matches[0];
}
</pre>

Assuming that you've checked all of the obvious things - such as ensuring that the main bind configuration file is what you think it is. Firstly check that the that you think named is using are the right ones - sometimes it's easy to edit a file that's in the wrong directory and wonder why changes aren't noticed.
Also have you used named-checkconf and named-checkzone
It is hard enough to debug bind, but without seeing the config files it is almost impossible, so please add them  to the original post.
(I've added this as a comment to the question - I've posted as an answer because the OP is new here).