AFSearch.ConvertAFPatternToRegexPattern Method
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Convert an AF query pattern to a pattern that can be used with .NET Regex class.
Namespace: OSIsoft.AF.Search
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public static string ConvertAFPatternToRegexPattern( string afPattern, AFSearchTextOption textOption )
Public Shared Function ConvertAFPatternToRegexPattern ( afPattern As String, textOption As AFSearchTextOption ) As String Dim afPattern As String Dim textOption As AFSearchTextOption Dim returnValue As String returnValue = AFSearch.ConvertAFPatternToRegexPattern(afPattern, textOption)
public: static String^ ConvertAFPatternToRegexPattern( String^ afPattern, AFSearchTextOption textOption )
static member ConvertAFPatternToRegexPattern : afPattern : string * textOption : AFSearchTextOption -> string
Parameters
- afPattern
- Type: SystemString
The AF query pattern to be converted. - textOption
- Type: OSIsoft.AF.SearchAFSearchTextOption
The text search option to be applied to the pattern.
Return Value
Type: StringReturns a pattern that can be used with the .NET Regex class for matching regular expression patterns.
Remarks
This helper method will convert a query pattern used in AF search methods to a pattern
that can be used with the .NET Regex class for matching regular expressions.