Regex: moved and deleted content from the "Patterns and flags".

1. Moved some content that was not pertinent.
2. Deleted a repetition.

Closes 962.
This commit is contained in:
luc4leone 2019-05-06 20:18:33 +02:00
parent ed86221c7f
commit 9e598e5ba2
2 changed files with 4 additions and 8 deletions

View file

@ -1,13 +1,5 @@
# 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*.
There are two syntaxes to create a regular expression object.

View file

@ -1,3 +1,7 @@
# Regular expressions
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.