Skip to content

Commit c0407fa

Browse files
authored
docs: Explain what the "advanced regex" does (#755)
1 parent ef00b12 commit c0407fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/queries/about.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ screen.getByText('hello world', { exact: false }) // ignore case
259259
screen.getByText(/World/) // substring match
260260
screen.getByText(/world/i) // substring match, ignore case
261261
screen.getByText(/^hello world$/i) // full string match, ignore case
262-
screen.getByText(/Hello W?oRlD/i) // advanced regex
262+
screen.getByText(/Hello W?oRlD/i) // substring match, ignore case, searches for "hello world" or "hello orld"
263263

264264
// Matching with a custom function:
265265
screen.getByText((content, element) => content.startsWith('Hello'))

0 commit comments

Comments
 (0)