Tcl Source Code

Check-in [2425a69341]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:[6585b21ca8] [regexp {(\w).*?\1} abb] failed to match. Thanks to Tom Lane for passing on the discovery in Postgres.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-5-branch
Files: files | file ages | folders
SHA1: 2425a69341514a24672f77f420f525b6d844d1ff
User & Date: dgp 2013-07-26 13:21:30
Context
2013-07-29
09:29
Make sure that "string is space \u202f" will continue to return "1", even if in future Unicode this ... check-in: 334ab96e5e user: jan.nijtmans tags: core-8-5-branch
2013-07-26
13:24
[6585b21ca8] [regexp {(\w).*?\1} abb] failed to match. Thanks to Tom Lane for passing on the discove... check-in: bff43cd4c3 user: dgp tags: trunk
13:21
[6585b21ca8] [regexp {(\w).*?\1} abb] failed to match. Thanks to Tom Lane for passing on the discove... check-in: 2425a69341 user: dgp tags: core-8-5-branch
2013-07-25
14:24
Move test for pthread_atfork inside SC_ENABLE_THREADS check-in: f7fe2446ce user: jan.nijtmans tags: core-8-5-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/regexec.c.

508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
		    return REG_OKAY;
		}
		if (er != REG_NOMATCH) {
		    ERR(er);
		    return er;
		}
		if ((shorter) ? end == estop : end == begin) {
		    /*
		     * No point in trying again.
		     */

		    *coldp = cold;
		    return REG_NOMATCH;
		}

		/*
		 * Go around and try again
		 */

		if (shorter) {







<
<
<
|
<
<







508
509
510
511
512
513
514



515


516
517
518
519
520
521
522
		    return REG_OKAY;
		}
		if (er != REG_NOMATCH) {
		    ERR(er);
		    return er;
		}
		if ((shorter) ? end == estop : end == begin) {



		    break;


		}

		/*
		 * Go around and try again
		 */

		if (shorter) {

Changes to tests/regexp.test.

724
725
726
727
728
729
730




731
732
733
734
735
736
737
	append e [format %c [incr cp]]
    }
} -body {
    regexp -about $e
} -cleanup {
    unset -nocomplain e cp
} -returnCodes error  -match glob -result {*too many colors*}





test regexp-23.1 {regexp -all and -line} {
    set string ""
    list \
	[regexp -all -inline -indices -line -- {^} $string] \
	[regexp -all -inline -indices -line -- {^$} $string] \
	[regexp -all -inline -indices -line -- {$} $string]







>
>
>
>







724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
	append e [format %c [incr cp]]
    }
} -body {
    regexp -about $e
} -cleanup {
    unset -nocomplain e cp
} -returnCodes error  -match glob -result {*too many colors*}
test regexp-22.6 {Bug 6585b21ca8} {
    expr {[regexp {(\w).*?\1} Programmer m] ? $m : "<NONE>"}
} rogr


test regexp-23.1 {regexp -all and -line} {
    set string ""
    list \
	[regexp -all -inline -indices -line -- {^} $string] \
	[regexp -all -inline -indices -line -- {^$} $string] \
	[regexp -all -inline -indices -line -- {$} $string]