Jump to content

Regex to get last numbers in a string.


WeirdMystery

Recommended Posts

Hello, could anyone provide me with a regex that gets the last numbers of a string.

 

Example...

"The Useless Piece of Trash - Newly Updated - 22 More Items! - 224 Players" or

 

"The Useless Piece of Trash - OLD - Go To New Game - 22 Players"

 

I want to get "22 Players".

 

Thanks...

Link to comment
https://forums.phpfreaks.com/topic/202446-regex-to-get-last-numbers-in-a-string/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.