On Tuesday, September 28, 2021 at 3:11:22 PM UTC+2, oleg wrote:
Hi, all.
There is regexp -start option, but no -stop option. How can i tell regexp command to stop matching at some position? May be i missed something?
Use string range (or string replace) to remove the unwanted part of the string. Unlike for -start this does not temper with the indices.
Two caveats:
Edge case: Depending on whether look-ahead matches should have matched beyond -stop, this might not suit your expectation.
Performance: String range (and string replace) require copying (new Tcl_Obj and memcpy), but I guess the overall impact is acceptable.
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)