Suppose there is a string |дядя |Вася |23 . It is necessary that the regular expression matches only if the characters | there will be an even amount. Is it possible to do this in a purely regular expression, without the involvement of programming language tools?

    1 answer 1

    You can, here:

     ^(([^|]*\|){2})*[^|]*$