Changeset 2329
- Timestamp:
- 10/11/07 23:04:37 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
Trunk/SpeechSubmission/VFSpeechSubmission/java/src/speechrecorder/CapturePlayback.java
r2328 r2329 1517 1517 usernameTextField.selectAll(); 1518 1518 userName = usernameTextField.getText(); 1519 //!!!!!! 1520 // see java.util.regex.Pattern 1521 // \w A word character: [a-zA-Z_0-9] 1522 // \W A non-word character: [^\w] 1523 userName = (usernameTextField.getText().replaceAll("\\W","")); 1524 // !!!!!! 1519 1525 if (userName.length() == 0 ) { 1520 1526 userName = "anonymous"; 1521 1527 } else { 1522 // !!!!!!1523 // see java.util.regex.Pattern1524 // \w A word character: [a-zA-Z_0-9]1525 // \W A non-word character: [^\w]1526 userName = (usernameTextField.getText().replaceAll("\\W","")).substring(0,25);1528 // !!!!!! 1529 if (userName.length() > 25 ) { 1530 userName = userName.substring(0,25); 1531 } 1532 // !!!!!! 1527 1533 } 1528 // !!!!!!1534 1529 1535 } catch (NullPointerException ex) { 1530 1536 userName = "anonymous";