b3ta.com board
You are not logged in. Login or Signup
Home » Messageboard » XXX » Message 8302293 (Thread)

# or replace '.' with '. '
then replace ' '(two spaces) with ' '(one)
(, Sun 20 Apr 2008, 5:52, archived)
# That'd work
unless of course you want to be able to have double spaces elsewhere, then you're fucked
(, Sun 20 Apr 2008, 5:54, archived)
# Exactly.
I need to be able to leave the text pretty much untouched, because that will matter to the people entering it. But I can't allow single periods in the middle of lines of text, it's too risky in terms of form security in the context it will be used.
(, Sun 20 Apr 2008, 5:58, archived)
# Anyone who uses double spaces deserves everything that happens to them -
Tried posting multiple spaces here?
(, Sun 20 Apr 2008, 6:00, archived)
# Er
Y                 es
(, Sun 20 Apr 2008, 6:19, archived)
# Just me then
THERE MUST BE MORE TO LIFE.
(, Sun 20 Apr 2008, 6:25, archived)
# That will put a space between each period in an elipse.
So ... would become . . .
Also, I don't want to run replace twice on the string when I can (hopefully) write a regex that will do the job in one pass. I know it's possible, I just haven't been able to get it right.
(, Sun 20 Apr 2008, 5:55, archived)
# in emergency then replace ". ." with ".."
repeat a few times
(, Sun 20 Apr 2008, 6:03, archived)
# I think the point is he knows he could do this
but is trying to just figure an expression that will handle it in a single pass rather than multiple
(, Sun 20 Apr 2008, 6:04, archived)