Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
avdhoottt committed Nov 14, 2024
1 parent c1aa1a9 commit e4d2138
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content/javascript/concepts/regexp/regexp.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ A `RegExp` object can also have flags set along with a pattern to change how mat

There are two ways to create a `RegExp` object:

1. Literal Notation: Use slashes to delimit the pattern, followed by any flags.
- Literal Notation: Use slashes to delimit the pattern, followed by any flags.

```js
let re1 = /foo?/i;
```

2. Constructor Function: Use the `RegExp` constructor, passing the pattern as the first argument and any flags as the second.
- Constructor Function: Use the `RegExp` constructor, passing the pattern as the first argument and any flags as the second.

```js
let re2 = new RegExp('foo?', 'i');
Expand Down

0 comments on commit e4d2138

Please sign in to comment.