I have this pattern
@"($\w+)"
And it will successfuly catch for example $substring inside long text $substring the rest of the text.
But it will fail in certain scenarios, for example some string $sub.string the rest of string will only return $sub
What can I do to get an actual full substring from the string?