Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
92767869
Commit
92767869
authored
Mar 05, 2009
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
typos
R=gri DELTA=3 (0 added, 1 deleted, 2 changed) OCL=25728 CL=25728
parent
8ba28758
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
regexp.go
src/lib/regexp/regexp.go
+2
-3
No files found.
src/lib/regexp/regexp.go
View file @
92767869
...
...
@@ -10,7 +10,6 @@
// concatenation { '|' concatenation }
// concatenation:
// { closure }
//
// closure:
// term [ '*' | '+' | '?' ]
// term:
...
...
@@ -31,7 +30,7 @@ import (
var
debug
=
false
;
// Error codes returned by fa
li
ures to parse an expression.
// Error codes returned by fa
il
ures to parse an expression.
var
ErrInternal
=
os
.
NewError
(
"internal error"
);
var
ErrUnmatchedLpar
=
os
.
NewError
(
"unmatched '('"
);
var
ErrUnmatchedRpar
=
os
.
NewError
(
"unmatched ')'"
);
...
...
@@ -717,7 +716,7 @@ func (re *Regexp) doExecute(str string, pos int) []int {
// substrings matched by the expression.
// s[a[0]:a[1]] is the substring matched by the entire expression.
// s[a[2*i]:a[2*i+1]] for i > 0 is the substring matched by the ith parenthesized subexpression.
// A
value of -1
means the subexpression did not match any element of the string.
// A
negative value
means the subexpression did not match any element of the string.
// An empty array means "no match".
// (Regexp is an internal type that implements the Regexp interface.)
func
(
re
*
Regexp
)
Execute
(
s
string
)
(
a
[]
int
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment