Hello,

 

I came across a strange behavior in regular expression processing, please see 
the following simple code which is supposed to match the second line of data 
variable.

 

https://go.dev/play/p/QPrNRuhCv8r

 

The matching data starts at the beginning of the 3rd line so I expect the 
pattern `^` + l + `\s+([0-9]+)\s+` would result in a match, but it does not. If 
I remove `^` from the regular expression, then the match is found. Running 
`grep -E` with regular expression which includes `^` also finds the expected 
match.

 

Appreciate some feedback. Is it a bug or I do something incorrectly?

 

Thank you

Serguei 

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/1DF73419-C0C8-48CD-ACE5-8745927C70F9%40gmail.com.

Reply via email to