I am trying to write a RegEx for preg_match_all in php to match a string inside 2 $ symbols, like $abc$ but only if it doesn't have a space, for example, I don't need to match $ab c$.
I wrote this regex /[\$]\S(.*)[\$]/U and some variations but can't get it to work.
Thanks for your help guys.