add/remove space after periods...

Discussion in 'Javascript' started by Joseph, Dec 18, 2004.

  1. Joseph

    Joseph Guest

    I have a textBox that people writes stories in it. They can use [bbcode]
    [/bbcode] for format.

    I have Aspell installed on the server, so people can make correction to
    their text. Sometimes, they forget to add a space after a period. So Aspell
    reads the last word of a sentence and the first word of the next sentence as
    a single world, which gives an error, word not found.

    Before sending the text to Aspell, i add a space after all the periods with:

    string = string.replace(/./g, ". ");

    I did this for the coma, and it's working, no problem.

    But i dont want to add a space after periods in certain [bbcode] [/bbcode].
    Because the links will not work.

    [link]http://www.tromal.net/index3.php[/link]
    [​IMG]

    I dont know how to do it, but after i added a space to all periods, i could
    search for "http" and remove all the space after the periods till the next
    "[".

    Or the space could only be added when the period is not between
    [link][/link] and

    Could someone help me on this one, thanks,

    André Couturier
    www.tromal.net
     
    Joseph, Dec 18, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Shuo Xiang

    Stack space, global space, heap space

    Shuo Xiang, Jul 9, 2003, in forum: C Programming
    Replies:
    10
    Views:
    2,978
    Bryan Bullard
    Jul 11, 2003
  2. Christian Seberino
    Replies:
    21
    Views:
    1,798
    Stephen Horne
    Oct 27, 2003
  3. Ian Bicking
    Replies:
    2
    Views:
    1,106
    Steve Lamb
    Oct 23, 2003
  4. Ian Bicking
    Replies:
    2
    Views:
    783
    Michael Hudson
    Oct 24, 2003
  5. Joseph

    add/remove space after periods...

    Joseph, Dec 18, 2004, in forum: Javascript
    Replies:
    8
    Views:
    189
    Joseph
    Dec 20, 2004
Loading...

Share This Page