On refiddle.com set to JavaScript, try using this pattern
/\|(?![^{]*})/g
with this text
word1 | {word2 | word3 } | word 4 | word 4 | {word2 | word3 }
This should match all of the Pipe symbols that are not inside {}.
More Related Contents:
- Awk – replace coumn 2 in table 1 from coumn 2 in table 2 based on matching data in column 1 (common between tables)
- Reference – What does this regex mean?
- How do I match any character across multiple lines in a regular expression?
- How do you match only valid roman numerals with a regular expression?
- Regular expression pipe confusion
- How to use conditionals when replacing in Notepad++ via regex
- Exclude characters from a character class
- Find CRLF in Notepad++
- Can you make just part of a regex case-insensitive?
- Multi-line regular expressions in Visual Studio Code
- Verbs that act after backtracking and failure
- mod_rewrite: replace underscores with dashes
- Multiline regex to match config block
- How is the AND/OR operator represented as in Regular Expressions?
- Remove ‘index.php’ from URL with .htaccess
- Regex Until But Not Including
- Math operations in regex
- Multiple words in any order using regex [duplicate]
- Why are there so many different regular expression dialects?
- Split text by columns in PowerShell
- How to replace a whole line with sed?
- Replace newlines with literal \n
- Regex that matches integers in between whitespace or start/end of string only
- Regex to match an ISO 8601 datetime string
- How to capture multiple regex matches, from a single line, into the $matches magic variable in Powershell?
- Replace all whitespace with a line break/paragraph mark to make a word list
- Why do regex engines allow / automatically attempt matching at the end of the input string?
- How do I turn any regex into an complement of itself without complex hand editing?
- Apache mod_rewrite REDIRECT_STATUS condition causing directory listing
- Matching url with array list of words in AngularJS ui-router