Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Practice, practice, practice.

The good news is that the same operators used by Apple work pretty much in every other language as well.
 
You can use a tool like https://regexr.com to test your regular expressions before you use them in your code. A tool like this one, or others, would also have a reference that you can use to pick what you need.

If someone can recommend a better regular expression tool I would like to hear about it.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.