| Author |
Find carriage return in string value
|
Melinda Savoy
Ranch Hand
Joined: Jun 21, 2005
Posts: 377
|
|
I have textarea box in my web page and in my javacode I am needing to break up this string if the length of the string is more than 45 character or if a carriage return is found in the string. My question is how do I find a carriage return in a string value? Any suggestions or direction would be greatly appreciated. Regards.
|
 |
Keith Lynn
Ranch Hand
Joined: Feb 07, 2005
Posts: 2341
|
|
|
A carriage return is represented as a \r.
|
 |
Srikanth Ramu
Ranch Hand
Joined: Feb 20, 2007
Posts: 76
|
|
For more details refer below link: http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html
|
 |
Melinda Savoy
Ranch Hand
Joined: Jun 21, 2005
Posts: 377
|
|
Thanks for the help guys. Regards.
|
 |
marc weber
Sheriff
Joined: Aug 31, 2004
Posts: 11343
|
|
|
Also note that a carriage return ('\r') is different than a newline ('\n') or form feed ('\f').
|
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
|
 |
 |
|
|
subject: Find carriage return in string value
|
|
|