No. There is no way to get the ui search parameters into a plugin.
While I understand the desire to not reinvent the wheel, keep in mind that Sigil uses PCRE regex and python plugins use either the re module or the regex module. And while they're all very similar, it's conceivable (and actually likely in the case of complex expressions) that the same saved expressions will not produce the same results when using different regex implementations. There are also syntax differences to take into consideration.
The bottom line is that even if there were a way to do what you want, only the simplest of expressions would be able to be used interchangeably.
Last edited by DiapDealer; 04-06-2020 at 08:18 AM.
|