Getting line of a search term - Python Script for Notepad++ -


i'm trying automate deleting of text on html code i'm editing on notepad++, i'm using plugin pythonscript that. have 1 problem: want delete, example, <center> except first one. thought use function:

editor.rereplace("search", "replace"[, flags[, startposition[, endposition[, maxcount]]]]) 

since don't want delete first term, set startposition 1 line after 1 first term.the problem don't find scintilla function in python script locate text looking for. maybe research function find solution:

editor.research(search, matchfunction[, flags[, startposition[, endposition[, maxcount]]]]) 

but can't find function associated .research me.

matches = [] def match_found(m):     # append match start position matches array     matches.append(m.end(0))  editor.research('pattern', match_found)  matches[0]  #should contain index of *end* of first match 

m.end() since want use end of match start of next search


Comments

Popular posts from this blog

how to do line continuation in perl debugger for entering raw multi-line text (EOT)? -

javascript - Create websocket without connecting -

sharepoint - Accessing files across a shared directory using a Windows service -