On 30/06/2022 10:53, aotto1968 wrote:
using the code
set match "MkObjectLogC"
while {[regsub {(?!\()([A-Z][a-z]+)(?!\))} $match {(?:\1)?} match]} {}
but the solution is:
"(?:Mk)?(?:(?:(?:(?:(?:Ob)?j)?e)?c)?t)?(?:(?:Lo)?g)?C"
the online regexp is ok:
That's because you repeatedly reprocess the result of the previous substitution. The online regexp does the processing in one go. If you do
the same with regsub, you get the requested result:
regsub -all {(?!\()([A-Z][a-z]+)(?!\))} $match {(?:\1)?} match
Schelte.
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)