FileHelperAliases.

FindRegexMatchInFile(ICakeContext, FilePath, Encoding, string, RegexOptions) Method

Summary

Finds the first regex match in a textfile.
Assembly
Cake.FileHelpers.dll
Namespace
Cake.FileHelpers
Containing Type
FileHelperAliases

Syntax

public static string FindRegexMatchInFile(this ICakeContext context, FilePath file, Encoding encoding, string rxFindPattern, RegexOptions rxOptions)

Attributes

Type Description
CakeMethodAliasAttribute

Parameters

Name Type Description
context ICakeContext The context.
file FilePath The file.
encoding Encoding The encoding to use for the file.
rxFindPattern string The regex pattern to search for.
rxOptions RegexOptions The regex options.

Return Value

Type Description
string The first regex match in the file.