Useful Regex Flags and String Methods

Regular expressions(regex) can be scary. I remember the first time seeing a regular expression and wondering what on earth was going on. Luckily for us, there’s plenty of resources to help us understand regular expressions. I’ve gone through many of these and I’ll be sharing the regex flags I think can help make life easier.

Writing a regular expression

There are two ways to write regular expressions. You can either create a regex inline(example1) or define your expression separately(example2). I’ve included both ways below. In more…