I have a project that contains multiple occurrences of t('str_ing1.string2')
the str_ing1
is not same for all occurrences and I want to remove str_ing1
using regex vscode search, Can anyone help?
CodePudding user response:
You can use this pattern: (?<=t\(').*?(?=\.string2)
CodePudding user response:
Find this regex
t('[^.'] \.
Replace
t('
If you want to keep the .
t('.
If string2
is a constant
Find
t('[^.'] \.string2
Replace
t('string2