You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
laptop$ cat userids.txt
dgryski
laptop$ cindex .
2012/01/24 14:48:22 index /[XXXXXX]/
2012/01/24 14:48:22 flush index
2012/01/24 14:48:22 merge 0 files + mem
2012/01/24 14:48:22 8 data bytes, 237 index bytes
2012/01/24 14:48:22 done
laptop$ csearch '[g]r'
/[XXXXX]/userids.txt:dgryski
laptop$ csearch '[Hg]r'
/[XXXXX]/userids.txt:dgryski
laptop$ csearch '[Gg]r'
laptop$
laptop$ csearch 'g[Rr]'
/[XXXXX]/userids.txt:dgryski
laptop$ csearch '[Dd]g'
laptop$ csearch '[ZDd]g'
/[XXXXX]/userids.txt:dgryski
laptop$
What is the expected output? What do you see instead?
I expect 'dgryski' to be printed, but instead depending on the regex no lines
are found.
What version of the product are you using? On what operating system?
070ef10ab799 tip. Darwin 10.8.0
Please provide any additional information below.
Original issue reported on code.google.com by dgryski on 24 Jan 2012 at 1:59
The text was updated successfully, but these errors were encountered:
Actually, it looks like it fails when the two-letter-character class is the
first item in the regex.
laptop$ csearch 'd[gG]r'
/[XXXXX]/userids.txt:dgryski
Original comment by dgryski on 24 Jan 2012 at 2:09
I did a bit of investigation last night and it looks like the problem is with
match.go:stepByte(). If we need to fold for this particular instruction, we
uppercase the character 'c', but it doesn't get reset back to the lowercase
version when we move on to processing the next state -- the character 'c' is
still the modified uppercase version instead of the original lowercase version
that's actually in the string.
I've attached a patch to match.go to fix this, and two test cases to
regexp_test.go.
Original comment by dgryski on 27 Jan 2012 at 8:51
Original issue reported on code.google.com by
dgryski
on 24 Jan 2012 at 1:59The text was updated successfully, but these errors were encountered: