# Regular Expression

1 min read, 42 words regexregularexpression

# Questions

How to use regex match with a variables?

Use RegExp constructor

// multiple flags at once, global and ignore-case
const pattern = new RegExp(myVar, 'gi');
myBlob.match(pattern)

# Resources

Subscribe to our Newsletter

If you like my work and think it was helpful kindly support my work


Buy Me A Coffee