Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Update regular expression about readme #2475

Merged
merged 1 commit into from
Jun 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions concepts/regular-expressions/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This concept is focused on using regular expressions in JavaScript. If you want

## How to create Regular Expressions

In JavaScript, a regular expressions is mostly written in the format `/pattern/modifiers` where 'pattern' is the main regex, and 'modifiers' are a series of characters which we can add to indicate special options (like superpowers).
In JavaScript, regular expressions are mostly written in the format `/pattern/modifiers` where 'pattern' is the main regex, and 'modifiers' are a series of characters which we can add to indicate special options (like superpowers).

Nevertheless, we have two ways of creating a regular expression:

Expand Down Expand Up @@ -119,7 +119,7 @@ funnyQuote.match(regex3);

### Replace

The [replace()][mdn-regex-replace] method in JavaScript allows us to search for a value within a given string, and replacing it with a desired new value.
The [replace()][mdn-regex-replace] method in JavaScript allows us to search for a value within a given string, and replace it with a new value.

```javascript
string.replace(searchValue, newValue);
Expand Down