PHPStorm Regex Replace with back calls -
i want use phpstorm find , replace instances of:
[a-z]['][s]
example:
andy's
or david's
to:
andy\'s
or david\'s
i have regex above, want know how use found character in regex in replace.
there several problems regex way have it: [a-z]['][s]
you can't use shortcut [a-z]
range of upper , lower. need use [a-za-z]
. don't need apostrophe , s in brackets:
[a-za-z]'s
then, replace matched group, use $ groups:
([a-za-z])'s
, replacing $01\\\\'s
Comments
Post a Comment