Merge pull request #965 from luc4leone/regex-intro

Regex: moved and deleted content from the "Patterns and flags".
This commit is contained in:
Ilya Kantor 2019-05-07 09:18:46 +02:00 committed by GitHub
commit f7a97ec17e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 8 deletions

View file

@ -1,13 +1,5 @@
# Patterns and flags # Patterns and flags
Regular expressions is a powerful way of searching and replacing inside a string.
In JavaScript regular expressions are implemented using objects of a built-in `RegExp` class and integrated with strings.
Please note that regular expressions vary between programming languages. In this tutorial we concentrate on JavaScript. Of course there's a lot in common, but they are a somewhat different in Perl, Ruby, PHP etc.
## Regular expressions
A regular expression (also "regexp", or just "reg") consists of a *pattern* and optional *flags*. A regular expression (also "regexp", or just "reg") consists of a *pattern* and optional *flags*.
There are two syntaxes to create a regular expression object. There are two syntaxes to create a regular expression object.

View file

@ -1,3 +1,7 @@
# Regular expressions # Regular expressions
Regular expressions is a powerful way of doing search and replace in strings. Regular expressions is a powerful way of doing search and replace in strings.
In JavaScript regular expressions are implemented using objects of a built-in `RegExp` class and integrated with strings.
Please note that regular expressions vary between programming languages. In this tutorial we concentrate on JavaScript. Of course there's a lot in common, but they are a somewhat different in Perl, Ruby, PHP etc.