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

java - How to print docx and pdf? -

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

java - IntelliJ to move a class along with conflicted classes to a new package? -