Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
minitech
on Sept 26, 2019
|
parent
|
context
|
favorite
| on:
Programming Idioms
Now it doesn’t work if the string you want to replace has any regex special characters. One JS idiom for replace-all is
str.split(before).join(after)
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: