I have variables like this:

```
$path1 = "<span class='span1' data-id=2>lorem ipsum</span>";
$path2 = "<span class='span2' data-id=14>lorem ipsum</span>";

```

I need to get value of `data-id` but I think it's not possible in php.

Maybe is possible to get last integer in a string ?
Something like:

```
$a = $path1.lastinteger(); // 2
$b = $path2.lastinteger(); // 14

```

Any help?