====== RegExMatch(text, regex_text) ======
Category:  Text function

\\ 
=====Description=====
This function returns the first substring that matches the regular expression pattern //regex_text//.

\\ 
=====Use cases=====
//RegExMatch// is useful for fuzzy-matching and extracting substrings of text using a specific pattern of characters.


\\ 
=====Arguments=====
^Argument^Type^Description^
|text|Text|The text value to test for the //regex_text// RegEx pattern.|
|regex_text|Text (RegEx pattern)|The string pattern to search for within //text//.  The first instance of text matching this pattern is returned.|

**Return value type:** Text

\\ 
=====Remarks=====

EasyMorph uses the [[https://docs.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-language-quick-reference|.NET regex language]].

\\
=====Examples=====

  regexmatch('12345678', '^\d{4}') //Returns '1234'

  regexmatch('MaryAnne', '[a-zA-z]{4}) //Returns 'Mary'

\\ 
===== See also =====
  * [[syntax:functions:isregexmatch|IsRegExMatch(text, regex_text)]]
  * [[syntax:functions:regexreplace|RegexReplace(text, replace_text, regex_text)]]