Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Comment
by
MatmaRex
· 6y ago · 0 comments
.match() only returns the result of one match, rather than all the matches in the string. To do that, you'd need to use .matchAll() (which didn't exist in 2008), or write an awkward do…while loop. Using .replace() looks neater.
Comments
No comments yet.
Better HN