How do you use a variable in a regular expression?

Subscribers:
4,110
Published on ● Video Link: https://www.youtube.com/watch?v=5qQLgCQ4xjo



Duration: 5:35
1 views
0


How do you use a variable in a regular expression?
I hope you found a solution that worked for you :)
The Content (except music & images) is licensed under (https://meta.stackexchange.com/help/licensing)CC BY-SA |
Thanks to all those great people for their contributions!

(stackoverflow.com/users/4541/jc-grubbs)JC Grubbs |
(stackoverflow.com/users/25066/eric-wendelin)Eric Wendelin |
(stackoverflow.com/users/48077/gracenotes)Gracenotes |
(stackoverflow.com/users/18936/bobince)bobince |
(stackoverflow.com/users/4722345/jballin)JBallin |
(stackoverflow.com/users/813/paige-ruten)Paige Ruten |
A special thanks goes out to the (https://stackoverflow.com/questions/494035/how-do-you-use-a-variable-in-a-regular-expression)Stackexchange community |

I wish you all a wonderful day! Stay safe :)

regex javascript







Tags:
regex
javascript