Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

AFSearch.ConvertAFPatternToRegexPattern Method

  • Last UpdatedNov 18, 2025
  • 2 minute read
AFSearch.ConvertAFPatternToRegexPattern Method
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: String
Returns 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.

Version Information

AFSDK


See Also

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in