converting sed twine php
i have regexp i'm controlling sed, nonetheless i need work php also. i can't component calls disabled.
$ cat uglynumber.txt:
ticket array : 303905694, foo:bar:bar: text
case id:123,456,789:foobar - text
303867970;[foobar] calm goes here
case ref: 303658850 - futile calm here - host.tld #78854w
$ cat uglynumbers.txt | sed "s/[, ]//g;s/.*\([0-9]\{9\}\).*/\1/g"
303905694
123456789
303867970
303658850
so, same php?
i found instance this, nonetheless i can't inject regexp that.
if (preg_match("/.../", $line, $matches)) {
relate "match found";
relate $matches[0];
}
Comments
Post a Comment