Regular expressions and pattern matching

Pattern matching, which plays a key role in Go, is a technique used for searching a string for some set of characters based on a specific search pattern that is based on regular expressions and grammars. If pattern matching is successful, it allows you to extract the desired data from the string, replace it, or delete it.

The Go package responsible for defining regular expressions and performing pattern matching is called regexp. You will see it in action in a while.

When using a regular expression in your code, you should consider the definition of the regular expression as the most important part of your program.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.4.181