Create a gist now

Instantly share code, notes, and snippets.

Embed

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], [tag:.net].
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? [tag:.net]

The list

Quantifiers:

Character classes:

Anchors:

Groups:

Lookaround:

Modifiers:

Escape sequence:

Other: not sure about the name ...

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

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

Advanced regex-fu

@rschrieken

This comment has been minimized.

Show comment
Hide comment
@rschrieken

rschrieken Mar 30, 2014

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

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

@Hamz-a

This comment has been minimized.

Show comment
Hide comment
@Hamz-a

Hamz-a Mar 30, 2014

You can fork it and then I will merge it.

Owner

Hamz-a commented Mar 30, 2014

You can fork it and then I will merge it.

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Apr 6, 2014

How do you merge a gist?

ghost commented Apr 6, 2014

How do you merge a gist?

@Hamz-a

This comment has been minimized.

Show comment
Hide comment
@Hamz-a

Hamz-a Apr 8, 2014

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

Owner

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