Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?

Reference - What does this regex mean?

What is this?

This is a collection of common Q&A. This is also a Community Wiki, so everyone is invited to participate in maintaining it.

Why is this?

[tag:regex] is suffering from give me ze code type of questions and poor answers with no explanation. This reference is meant to provide links to quality Q&A.

What's the scope?

This reference is meant for the following languages: [tag:php], [tag:perl], [tag:javascript], [tag:python], [tag:ruby], [tag:java], [].
This might be too broad, but these languages share the same syntax. For specific features there's the tag of the language behind it, example:

  • What are regular expression Balancing Groups? []

The list


Character classes:





Escape sequence:

Other: not sure about the name ...

Control verbes: [tag:php] [tag:perl]

Recursion: [tag:php] [tag:perl]

Advanced regex-fu

Should I leave comments or edit directly? if the latter: How?


Hamz-a commented Mar 30, 2014

You can fork it and then I will merge it.

KyraD commented Apr 6, 2014

How do you merge a gist?


Hamz-a commented Apr 8, 2014

@KyraD you can clone your gist on your disk, pull another (updated) gist and then push it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment