Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Replace symbol if it is preceded and followed by a word character js

This Works to find when a word is followed by another chars
string.match(/word([^s]|^)/) 

You can use ([^s]|^) before or after the word.

Cases: 
If the word has other char/word before it the code is:
string.match(/([^s]|^)word/)
If the word has other char/word after it the code is:
string.match(/word([^s]|^)/)
 
PREVIOUS NEXT
Tagged: #Replace #symbol #preceded #word #character #js
ADD COMMENT
Topic
Name
8+1 =