RegEx.NameCount
---------------

Queries number of names.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [RegEx](component_RegEx.md) | [4.4](newinversion44.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "RegEx.NameCount"; RegExRef ) 

**MBS**( **"RegEx.NameCount";** /\* Queries number of names. \*/  
**$RegExRef**) /\* The reference number for the regular expression returned from [RegEx.Compile](RegExCompile.md).e.g. $regex \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| RegExRef | The reference number for the regular expression returned from [RegEx.Compile](RegExCompile.md). | $regex |

### Result

Returns number or error.

### Description

Queries number of names.  
### Examples

Use a named group:

 Set Variable \[ $Pattern ; Value: "H(?P&lt;MyName&gt;.\*)o" \]   
Set Variable \[ $Regex ; Value: MBS ("[RegEx.Compile](RegExCompile.md)"; $Pattern ; "CaseLess") \]   
Show Custom Dialog \[ "Namecount" ; MBS ( "RegEx.nameCount"; $RegEx ) \]   
Set Variable \[ $r ; Value: MBS ("[RegEx.Release](RegExRelease.md)"; $RegEx ) \]  
### See also

- [RegEx.Compile](RegExCompile.md)
- [RegEx.Release](RegExRelease.md)

### Example Databases

- [RegEx/RegEx](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/RegEx/RegEx.shtml#2ScriptAnchor_)

This function is free to use.

Created 26th October 2014 , last changed 26th April 2023

  
[RegEx.MinimumLength](RegExMinimumLength.md) - [RegEx.NamedSubstring](RegExNamedSubstring.md)

[HTML Version](RegExNameCount.shtml)