Can anybody help me please. I get an url and need to take the last part after -.
Example data
game-when-no-one-at-xhU8c0dLcoins-at-the-desk-1xhz83cexample-example-1391340
Result needed
xhU8c0dL1xhz83c1391340
I just made a regex to take some last characters, but number of symbols can be 7 or 8.
preg_match('/.{7}(?=($|\r|\n))/')
Edit
This will work: preg_match('/[^-]*$/')