First of all the question itself is a bit confusing. It sounds like it's asking for String methods that are available in the Regular expression object. Which sounds weird.
Rephrasing it as "What are the String methods that accept Regular expressions?" would be more clear.
The answer is definitely more than the two methods mentioned in the answer. These are search(), replace(), replaceAll(), match(), matchAll() and split().^1
I can send a PR if necessary. Great project btw. Helping me to quickly refresh my JS knowledge.
First of all the question itself is a bit confusing. It sounds like it's asking for String methods that are available in the Regular expression object. Which sounds weird.
Rephrasing it as "What are the String methods that accept Regular expressions?" would be more clear.
The answer is definitely more than the two methods mentioned in the answer. These are
search()
,replace()
,replaceAll()
,match()
,matchAll()
andsplit()
.^1I can send a PR if necessary. Great project btw. Helping me to quickly refresh my JS knowledge.