V
V
Vladimir Golub2021-07-21 11:44:11
JavaScript
Vladimir Golub, 2021-07-21 11:44:11

How to exclude a character in a regular expression in a group not at the beginning of the line?

Regular - /{([^\We]+)}/

String - {derfrfrfr}

Required result - 1- d 2- rfrfrfr

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2021-07-21
@RazerVG

str.match(/(?<=\{.*)[^\We]+(?=.*\})/g)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question