Re: Space or end of string in regexby BrowserUk (Pope)
|on Feb 02, 2012 at 22:44 UTC||Need Help??|
You are almost there:
The $ means end-of-line. The ? following the space preceding the $, means the space is optional.
More formally, zero or one spaces may exist here.
That said, allowing for just one trailing space is unusually mean. More normal would be to allow only whitespace to follow the required text before the end-of-line. Which could be written:
Formally zero or more whitespace characters may precede the end-of-line.
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.