-1

I need to replace all pip that are followed by a number. Example: |2019 (2019 is an example, it is not standard). I have others pip like |note that I do not want them too be replaced.

To find numbers I know that I should use in Regex [0-9] but I can´t combine it with a pip.

Thank you!

DP_
  • 77
  • 5

2 Answers2

0

Since | is an operator for regular expressions, you have to escape it.

Use this:

\|[0-9]+

UniversE
  • 2,172
  • 13
  • 19
0

to replace |2019 with (2019 where 2019 is any random number, search for \|(\d+) and replace it with \($1 with Search Mode: Regular Expression

hanshenrik
  • 15,263
  • 3
  • 28
  • 61