Merge pull request #965 from luc4leone/regex-intro
Regex: moved and deleted content from the "Patterns and flags".
This commit is contained in:
commit
f7a97ec17e
2 changed files with 4 additions and 8 deletions
|
@ -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.
|
||||||
|
|
|
@ -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.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue