Hello,
I’m trying to use the regexp package to parse the dictionary “british-english” (/usr/share/dict/british-english
on Linux system) but unfortunately my code does not seem to do the correct matching. When I use the pattern ^cat$ I get an empty slice whereas egrep returns cat. I have used both ReadString('\')
or Read()
to read data from the file, there is no difference. Here the complete code https://play.golang.org/p/1FzeuYG6It8