Hello,

I now need to learn regular expressions for my work and since I can choose 
tool, I decided combine it with learning Go. When documentation of "regexp" 
package (I hope that I use this name correctly) is in most part clear to 
me, one thing is unclear to me. Since, I probably raise many more questions 
about Go standard library, I decided to name it as such.

In the description of function "func CompilePOSIX" 
(https://pkg.go.dev/regexp) we can read.
BEGINNING
That is, when matching against text, the regexp returns a match that begins 
as early as possible in the input (leftmost), and among those it chooses a 
match that is as long as possible. This so-called leftmost-longest matching 
is the same semantics that early regular expression implementations used 
and that POSIX specifies. 
END

Line "early regular expression implementations used and that POSIX 
specifies" is a bit confusing to me. I guess it can mean "old 
implementations Go regexp package", but also very old implementations of 
regular expressions in different languages and systems (?). Can someone 
help me understand this text?

Best
Kamil Ziemian

-- 
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/8e002363-da47-4c43-953f-a66fefc1bcdcn%40googlegroups.com.

Reply via email to