<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Need help with editor.rereplace in the pythonscript plugin]]></title><description><![CDATA[<p dir="auto">I have code that is supposed to replace every “/” with text lines 0 to 397. When I ran it, it replaced all the text with line 397 instead lines 0, 1, 2, etc. I looked online and it said you need some thing like this:</p>
<p dir="auto"><code>Editor.rereplace(search, replace[, flags[, startPosition[, endPosition[, maxCount]]]])</code></p>
<p dir="auto">I tried doing that, and even after using some other help online, I still coldn’t do it! I kept getting this error:</p>
<p dir="auto"><code>Index Error: Out of Bounds</code></p>
<p dir="auto">I can’t find anything else.  Here is my code: (I used to specify the <code>selectedLine</code> variable at the top, but that replaced all the /'s with line 0, and when I removed it, it replaced it with line 397.)</p>
<pre><code>notepad.open(r'C:\.......test.txt')
for i in range(396):
    editor.rereplace('/', editor.getLine(selectedLine), 0, 0, 396, 1)
    selectedLine = selectedLine + 1    
print(editor.getLine(selectedLine))
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/topic/18796/need-help-with-editor-rereplace-in-the-pythonscript-plugin</link><generator>RSS for Node</generator><lastBuildDate>Sun, 10 May 2026 05:14:09 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/18796.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 20 Jan 2020 22:53:33 GMT</pubDate><ttl>60</ttl></channel></rss>