how can i delete these thousands of phrases in quotes without having to do it manually?
-
The replacement tool only works if I specify some phrase, however I would like to know if there is any function that can remove all the phrases that are in quotes.
-
@dejoota said in how can i delete these thousands of phrases in quotes without having to do it manually?:
however I would like to know if there is any function that can remove all the phrases that are in quotes.
Although you have shown a lot of phrases, without knowing what else is in the file it might be problematic. Often regular expressions (regex) not only have to find what you are seeking but be designed to exclude what you don’t want affected.
That said, I’d consider the following using the Replace function (set search mode to regular expression):
Find What:"[^"]+"
Replace With: this field is to be empty what effectively means we select something and replace with nothing, so delete it.If that doesn’t work I suggest you read the pinned post at the start of the section “Please Read This Before Posting” which will help you to better explain what you have and for us to better help you.
Terry
-
Hello, @dejoota, @terry-r and All,
@dejoota, I suppose that you just want to remove the messages in the last group of double quotes, don’t you ?
So, here are three regex S/R which achieve this goal. Now, whatever your choice :
-
Open the Replace dialog (
Ctrl + H
) -
Untick all options
-
Tick the
Wrap around
option -
Click once on the
Replace All
button ( Do not use theReplace
button if the regex contains a\K
syntax )
Then :
-
If you want to remove, both, the
portuguese
and theenglish
versions :-
SEARCH
(?-i)[^"]+(?="$)
-
REPLACE
Leave EMPTY
-
So, from this INPUT text :
"npc_citizen.question00" "isto é um teste" "[english]npc_citizen.question00" "This is a test"
you’ll get this first OUTPUT text :
"npc_citizen.question00" "" "[english]npc_citizen.question00" ""
-
If you want to remove the
portuguese
version, only :-
SEARCH
(?-si)^(?="npc_citizen).+"\K[^"]+(?="$)
-
REPLACE
Leave EMPTY
-
you’ll get this second OUTPUT text :
"npc_citizen.question00" "" "[english]npc_citizen.question00" "This is a test"
-
If you want to remove the
english
version, only :-
SEARCH
(?-si)^(?="\Q[english]\E).+"\K[^"]+(?="$)
-
REPLACE
Leave EMPTY
-
you’ll get this third OUTPUT text :
"npc_citizen.question00" "isto é um teste" "[english]npc_citizen.question00" ""
Best Regards,
guy038
-