I would like to ask you something about the Python script.
I'm actualy using it only to mass Search/Replace text in
So I'm using for example : editor.replace("MICHAEL",
the issue comes when I need to replace some text that is
already between " " , so here is something I tried but it
didn't work :
example : editor.replace(""HELLO"", ""Hello"")
As you can see I try to replace "HELLO" by "Hello" , that's
why I duplicated the " " , but it doesn't work , do you have
any idea on how to fix that issue ?
Could I change the default separator " " with / /
So I'd have :
if yes where can I make that change ?
ANSWERED BY davegb3 :
You don't need to escape quotes around normal text -e.g. editor.replace("MICHAEL","Michael")
To put a quote in it, just escape the quote that's inside the text
Note that you can also use the other form of quotes to quote stuff. That's a nice feature of
python, is that it allows you to use the quotes that mean the other form doesn't need
Hope that helps,
Sorry to come back again to you but the script doesn't work , it doesn't even launch when I use this code :
Do you have any idea why ? : /
By doing this I want to change every special characters into HTML code
SyntaxError: Non-ASCII character '\xe9' in file C:\Documents and Settings\Administrator\Application Data\Notepad++\plugins\Config\PythonScript\scripts\marques.py on line 1, but no encoding declared;
I tried by adding
# coding= UTF-8
To the first line , now the scripts launch but it doesn't change any special character.
my .py file was ANSI coding , I changed it into UTF-8 and it looks like it's working now… I'll get back soon here if I've any issue =))
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.