I have a following regex:
[.][a-zA-Z]
So, if there's a string like .row then it will select .r. What I want is to be able to select only the dot i.e. regex selects only the dot(.)!
You need to use positive lookahead
let str = `.row`
console.log(str.match(/\.(?=[A-Za-z])/g))
[\.][(?=[A-Za-z])]/g) in VSCode find and replace. It didn't work/\.(?=[A-Za-z])/If you want to just select the dot, escape your . with \. since . means any single character. And don't include [a-zA-Z]
[\.]
.rowcannot possibly be the end of what you want to do. What are you trying to do that requires finding that dot?