S
S
sorry_i_noob2018-11-17 17:59:03
phpstorm
sorry_i_noob, 2018-11-17 17:59:03

How to use regular expression groups to replace in "Find and Replace" (Ctrl+H) in PhpStorm?

Hello! I want to use a group to replace. But its number is put instead. Why? I am attaching a screenshot.
5bf02be91ca69890457993.png
As a result,
preg_match_all();
Replaced by
preg_2_not_all();
A should by
preg_match_not_all();
But in Notepad ++ everything works as it should. How can I use this functionality for PhpStorm?
Here is the regular expression I'm searching for:
(preg_)(.*)(_all)
Here is the replacement regular expression:
preg_\2_not_all

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
riot26, 2018-11-17
@sorry_i_noob

Try $2instead\2

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question