Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 226 for NegExp (0.12 sec)

  1. src/regexp/regexp.go

    	} else {
    		regexp.prefix, regexp.prefixComplete, regexp.prefixEnd = onePassPrefix(prog)
    	}
    	if regexp.prefix != "" {
    		// TODO(rsc): Remove this allocation by adding
    		// IndexString to package bytes.
    		regexp.prefixBytes = []byte(regexp.prefix)
    		regexp.prefixRune, _ = utf8.DecodeRuneInString(regexp.prefix)
    	}
    
    	n := len(prog.Inst)
    	i := 0
    	for matchSize[i] != 0 && matchSize[i] < n {
    		i++
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 20:50:01 UTC 2024
    - 38.5K bytes
    - Viewed (0)
  2. src/regexp/syntax/regexp.go

    package syntax
    
    // Note to implementers:
    // In this package, re is always a *Regexp and r is always a rune.
    
    import (
    	"slices"
    	"strconv"
    	"strings"
    	"unicode"
    )
    
    // A Regexp is a node in a regular expression syntax tree.
    type Regexp struct {
    	Op       Op // operator
    	Flags    Flags
    	Sub      []*Regexp  // subexpressions, if any
    	Sub0     [1]*Regexp // storage for short Sub
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 29 16:41:51 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  3. src/regexp/example_test.go

    	fmt.Println(matched, err)
    	matched, err = regexp.MatchString(`bar.*`, "seafood")
    	fmt.Println(matched, err)
    	matched, err = regexp.MatchString(`a(b`, "seafood")
    	fmt.Println(matched, err)
    	// Output:
    	// true <nil>
    	// false <nil>
    	// false error parsing regexp: missing closing ): `a(b`
    }
    
    func ExampleQuoteMeta() {
    	fmt.Println(regexp.QuoteMeta(`Escaping symbols like: .+*?()|[]{}^$`))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 07 00:22:53 UTC 2023
    - 11.1K bytes
    - Viewed (0)
  4. src/regexp/syntax/parse_test.go

    			t.Errorf("Parse(%#q, Perl): %v", regexp, err)
    		}
    		if re, err := Parse(regexp, POSIX); err == nil {
    			t.Errorf("Parse(%#q, POSIX) = %s, should have failed", regexp, dump(re))
    		}
    	}
    	for _, regexp := range onlyPOSIX {
    		if re, err := Parse(regexp, Perl); err == nil {
    			t.Errorf("Parse(%#q, Perl) = %s, should have failed", regexp, dump(re))
    		}
    		if _, err := Parse(regexp, POSIX); err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 16 16:02:30 UTC 2023
    - 16.2K bytes
    - Viewed (0)
  5. operator/pkg/validate/common.go

    // matches.
    func repeated(res ...*regexp.Regexp) *regexp.Regexp {
    	return match(group(expression(res...)).String() + `+`)
    }
    
    // group wraps the regexp in a non-capturing group.
    func group(res ...*regexp.Regexp) *regexp.Regexp {
    	return match(`(?:` + expression(res...).String() + `)`)
    }
    
    // capture wraps the expression in a capturing group.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Aug 10 15:35:03 UTC 2023
    - 11K bytes
    - Viewed (0)
  6. tests/table_test.go

    	if !regexp.MustCompile("SELECT \\* FROM `user`").MatchString(r.Statement.SQL.String()) {
    		t.Errorf("Table with escape character, got %v", r.Statement.SQL.String())
    	}
    
    	r = dryDB.Table("user as u").Select("name").Find(&User{}).Statement
    	if !regexp.MustCompile("SELECT .name. FROM user as u WHERE .u.\\..deleted_at. IS NULL").MatchString(r.Statement.SQL.String()) {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Sat Mar 09 09:31:28 UTC 2024
    - 10.6K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/server/options/server_run_options_test.go

    		},
    		{
    			regexp: [][]string{
    				{`^http://foo.com$`, `^foo.com`}, // one good followed by a bad one
    			},
    			errShouldContain: "regular expression does not pin to start/end of host in the origin header",
    		},
    	}
    
    	for _, test := range tests {
    		for _, regexp := range test.regexp {
    			t.Run(fmt.Sprintf("regexp/%s", regexp), func(t *testing.T) {
    				options := NewServerRunOptions()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 27 15:49:49 UTC 2023
    - 10.9K bytes
    - Viewed (0)
  8. src/cmd/covdata/tool_test.go

    	testpoints := []struct {
    		tag string
    		re  *regexp.Regexp
    	}{
    		{
    			"args",
    			regexp.MustCompile(`^data file .+ GOOS=.+ GOARCH=.+ program args: .+$`),
    		},
    		{
    			"main package",
    			regexp.MustCompile(`^Package path: ` + mainPkgPath + `\s*$`),
    		},
    		{
    			"main function",
    			regexp.MustCompile(`^Func: main\s*$`),
    		},
    	}
    
    	bad := false
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 07 20:46:32 UTC 2024
    - 24.5K bytes
    - Viewed (0)
  9. tests/integration/pilot/istioctl_test.go

    			cases := []struct {
    				name  string
    				pod   string
    				wants []*regexp.Regexp
    			}{
    				{
    					name: "ingressgateway",
    					pod:  fmt.Sprintf("%s.%s", gwPod, i.Settings().SystemNamespace),
    					wants: []*regexp.Regexp{
    						regexp.MustCompile(fmt.Sprintf(`DENY\s+deny-policy\.%s\s+2`, i.Settings().SystemNamespace)),
    						regexp.MustCompile(fmt.Sprintf(`ALLOW\s+allow-policy\.%s\s+1`, i.Settings().SystemNamespace)),
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Apr 08 22:02:59 UTC 2024
    - 15K bytes
    - Viewed (0)
  10. src/regexp/exec_test.go

    	t.Logf("%d cases tested", ncase)
    }
    
    var run = []func(*Regexp, *Regexp, string) ([]int, string){
    	runFull,
    	runPartial,
    	runFullLongest,
    	runPartialLongest,
    }
    
    func runFull(re, refull *Regexp, text string) ([]int, string) {
    	refull.longest = false
    	return refull.FindStringSubmatchIndex(text), "[full]"
    }
    
    func runPartial(re, refull *Regexp, text string) ([]int, string) {
    	re.longest = false
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:36:03 UTC 2024
    - 20.7K bytes
    - Viewed (0)
Back to top