I have a string Like this:
MyText (1,151)
I would like to get with regex only the value inside (), in this case only: 1,151.
I know it's simple, but I'm not very familiar with regex.
Thank!
Almost the same question was asked. There are solutions out there that will work for you;)
This will work:
if (preg_match($str, '/\(([^)]*)\)/', $matches)) { $content = $matches[1]; }