March 30th, 2000, 01:19 PM
How can I ensure that users don't enter long lines of text into a text area box with no spaces into a text area field? ie.:
I would like the script (an interactive story which takes the entry of a form and posts to an html file) to insert a space if it comes across a line of more than 25 characters in a row without a space. Specifically so tricksters can't wreak havoc with the table layout. I also don't want to limit the entries of those who are really wishing to be a part of the story.
I can give more info about the existing script, if necessary. I also apologize ahead of time if you post a reply and I have to ask more questions because this is very new to me.
March 30th, 2000, 06:08 PM
What you are looking to do can be done with a well thought out regular expression. I would have to play around with it a bit, as regular expressions tend to involve a fair amount of trial and error work. You may want have perl look for a maximum number sequencial alpha-numberic characters before hitting a space or something.