Double Quotation Marks
-
Hi,
I am using notepad++ and checking a file this is consisting of values outputted in the following format : “value”|”Value”|
I want to search for where a double quotation mark has been inserted in error for example “value””|
Please can you let me know how can I search for this in notepad++
Many Thanks
-
What do the vertical lines in your examples indicate? Would searching for “” find the double set in your first example and in your second example? Is there a way to distinguish between the two examples?
-
Hello, Surinder Ram,
In your example, below, do you mean that the separator values is the real VERTICAL LINE, of Unicode value
\x007C?"Value_1"|"Value_2"|"Value_3"....If so, I suppose that you would like that :
-
The syntax
""|would be changed into"|" -
The syntax
|""would be changed into"|" -
The syntax
""would be changed into"|" -
The syntax
"|, NOT followed by a double quote mark, would be changed into"|" -
The syntax
|", NOT preceded by a double quote mark, would be changed into"|" -
The syntax
|, NOT surrounded by two double quote marks, would be changed into"|" -
And, if any of these syntaxes, above, are found at the end of the current line, it would be changed into a single final double quote mark (
") -
And, also, when the normal separator form
"|"or NO separator, at all, is found, at end of the current line, it would be changed into a single"character
In that case, just follow the few steps, below :
-
Go back to the very beginning of your file ( Ctrl + Origin )
-
Open the Replace dialog ( Ctrl + H )
-
In the Find what zone, type
(?:(""\||\|""|""|(?<!")\|"|"\|(?!")|(?<!")\|(?!")|"\|")|(?<=[^"|\r\n]))(?=(\R))|(?1) -
In the Replace with zone, type
(?2":"|") -
Click on the Replace All button
Et voilà !
So, from the original example, below, where :
-
Only, values 7 - 8 AND values 8 - 9 are correctly separated, on each line
-
The value9 is correctly ended, in the first line, only
value1"“|value2|”“value3"“value4”|value5|“value6|value7”|“value8”|“value9”
value1"”|value2|““value3"“value4”|value5|“value6|value7”|“value8”|“value9|””
value1"”|value2|““value3"“value4”|value5|“value6|value7”|“value8”|“value9"”|
value1"”|value2|”“value3"“value4”|value5|“value6|value7”|“value8”|“value9"”
value1"”|value2|““value3"“value4”|value5|“value6|value7”|“value8”|“value9|”
value1"”|value2|”“value3"“value4”|value5|“value6|value7”|“value8”|“value9”|
value1"”|value2|"“value3"“value4”|value5|“value6|value7”|“value8”|“value9|
value1"”|value2|”“value3"“value4”|value5|“value6|value7”|“value8”|“value9
value1"”|value2|”“value3"“value4”|value5|“value6|value7”|“value8”|“value9”|”
After that S/R, the different separators would be changed and the different values correctly separated, as below :
value1"|"value2"|"value3"|"value4"|"value5"|"value6"|"value7"|"value8"|"value9" value1"|"value2"|"value3"|"value4"|"value5"|"value6"|"value7"|"value8"|"value9" value1"|"value2"|"value3"|"value4"|"value5"|"value6"|"value7"|"value8"|"value9" value1"|"value2"|"value3"|"value4"|"value5"|"value6"|"value7"|"value8"|"value9" value1"|"value2"|"value3"|"value4"|"value5"|"value6"|"value7"|"value8"|"value9" value1"|"value2"|"value3"|"value4"|"value5"|"value6"|"value7"|"value8"|"value9" value1"|"value2"|"value3"|"value4"|"value5"|"value6"|"value7"|"value8"|"value9" value1"|"value2"|"value3"|"value4"|"value5"|"value6"|"value7"|"value8"|"value9" value1"|"value2"|"value3"|"value4"|"value5"|"value6"|"value7"|"value8"|"value9"
If this S/R ,just, solves your problem, next time, I’ll explain the regexes used !
Best Regards
guy038
-
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login