Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • They are different questions, so should remain separate. However I would recommend finding a good reg ex practice program or web site, and practice practice practice. Start with the basics ., *, +, ?, then add ^ and $, then add more. Commented Oct 26, 2019 at 8:59
  • 1
    @ctrl-alt-delor Note that most websites that provides regular expression tests implements Perl-like regular expressions and not POSIX regular expressions. GNU grep understands these with -P, but if you want portability, POSIX basic and extended regular expressions are more often used with Unix command line tools. Commented Oct 26, 2019 at 9:06