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

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -