Community Patterns

Community Library Entry

1

Regular Expression
Created·2024-10-04 19:20
Flavor·ECMAScript (JavaScript)

/
<Badge(?:(?:\n|.)*?)is="secondary"(?:(?:\n|.)*?)(?=\/Badge)
/
g
Open regex in editor

Description

In this example we are searching for all <Badge> element/component in JSX that have the is="secondary" prop. This regex was tested with VS Code

Submitted by anonymous