Documentation
¶
Overview ¶
Package futil provides helper functions for interacting with files
Index ¶
- func ExtractString(filepath string, exp string) (match string, err error)
- func ExtractStringP(filepath string, exp *regexp.Regexp) (match string, err error)
- func ExtractStrings(filepath string, exp string) (matches []string, err error)
- func ExtractStringsP(filepath string, exp *regexp.Regexp) (matches []string, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractString ¶
ExtractString reads the filepath data then compiles the given regular expression exp and applies it to the data and returns the results. Match will be empty if no matches were found. Use (?m) to have ^ $ apply to each line in the string. Use (?s) to have . span lines.
func ExtractStringP ¶
ExtractStringP reads the filepath data then applies the given regular expression to the data and returns the results. See ExtractString
func ExtractStrings ¶
ExtractStrings reads the filepath data then compiles the given regular expression exp and applies it to the data and returns the results. Matches will be nil if no matches were found. Use (?m) to have ^ $ apply to each line in the string. Use (?s) to have . span lines.
Types ¶
This section is empty.