Regex replace for String, 3 characters from the end -


i have been able add space string in input field using following:

onkeypress="this.value=this.value.replace(/^(\w{5})(?=\w)/,'$1 ')" 

but count start end of line, , add space after user input has stopped. i've tried onblur, not seem work in chrome.

any tips?

thanks

just guess -

onkeypress="this.value=this.value.replace(/(\w{5})(?=\w$)/,'$1 ')" 

Comments

Popular posts from this blog

sql server - MSSQL Text and Varchar(MAX) fields shown (MEMO) in DBGrid -

qml - Is it possible to implement SystemTrayIcon functionality in Qt Quick application -

mysql - Flyway migration, Unable to obtain Jdbc connection from DataSource -