I have sentences like this - \"this is a test. 4.55 and 5,000.\" I want to remove the period at the end of the sentences, but not between numbers. My output has to be - \"this
In regex, the $
special character "[matches] the end of the string or just before the newline at the end of the string"
In that case, assuming only one sentence per line, I would suggest the following:
\.$
This will match only periods that occur at the end of a string (or end of a line for multiline strings). Of course, if you cannot guarantee one sentence per line then they isn't the solution for you.