SyntaxColoring.ScriptSearchBox.SetRegEx
---------------------------------------

Sets whether script search uses regular expressions.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [SyntaxColoring](component_SyntaxColoring.md) | [13.1](newinversion131.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ❌ No |

MBS( "SyntaxColoring.ScriptSearchBox.SetRegEx"; Value ) 

**MBS**( **"SyntaxColoring.ScriptSearchBox.SetRegEx";** /\* Sets whether script search uses regular expressions. \*/  
**$Value**) /\* The new setting.  
Pass 1 to enable or 0 to disable.e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Value | The new setting.   Pass 1 to enable or 0 to disable. | 1 |

### Result

Returns OK or error.

### Description

Sets whether script search uses regular expressions.  
You may enable regular search to use expressions for more detailed searches.   
  
e.g. search for Feld|Field to do an OR search with two terms.  
Use $m(.\*)x to find variables starting in $m and ending in x.  
### Examples

Enable search with regular expressions:

 Set Variable \[ $r ; Value: MBS ( "SyntaxColoring.ScriptSearchBox.SetRegEx"; 1 ) \]   
Set Variable \[ $r ; Value: MBS ( "[SyntaxColoring.ScriptSearchBox.SetEnabled](SyntaxColoringScriptSearchBoxSetEnabled.md)"; 1 ) \]  
### See also

- [SyntaxColoring.ScriptSearchBox.GetEnabled](SyntaxColoringScriptSearchBoxGetEnabled.md)
- [SyntaxColoring.ScriptSearchBox.GetRegEx](SyntaxColoringScriptSearchBoxGetRegEx.md)
- [SyntaxColoring.ScriptSearchBox.GetText](SyntaxColoringScriptSearchBoxGetText.md)
- [SyntaxColoring.ScriptSearchBox.SetEnabled](SyntaxColoringScriptSearchBoxSetEnabled.md)
- [SyntaxColoring.ScriptSearchBox.SetText](SyntaxColoringScriptSearchBoxSetText.md)
- [SyntaxColoring.ScriptSearchButton.SetEnabled](SyntaxColoringScriptSearchButtonSetEnabled.md)

### Release notes

- **Version 13.1**
    - Added [SyntaxColoring.ScriptSearchBox.GetRegEx](https://www.mbsplugins.eu/SyntaxColoringScriptSearchBoxGetRegEx.shtml) and [SyntaxColoring.ScriptSearchBox.SetRegEx](https://www.mbsplugins.eu/SyntaxColoringScriptSearchBoxSetRegEx.shtml) functions.

### Blog Entries

- [Goodies 3: Search script](https://www.monkeybreadsoftware.com/filemaker/SyntaxColoring/03-Searchscript.shtml)
- [Neues MBS Plugin 13.1 für Claris FileMaker](https://www.mbsplugins.de/archive/2023-03-07/Neues_MBS_Plugin_131_für_Clar/monkeybreadsoftware_blog_filemaker)
- [MBS Plugin 13.1 for Claris FileMaker](https://www.mbsplugins.de/archive/2023-03-07/MBS_Plugin_131_for_Claris_File/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 13.1pr3](https://www.mbsplugins.de/archive/2023-02-16/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [Regular Expressions in Script Search](https://www.mbsplugins.de/archive/2023-02-06/Regular_Expressions_in_Script_/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 13th February 2023 , last changed 7th May 2023

  
[SyntaxColoring.ScriptSearchBox.SetEnabled](SyntaxColoringScriptSearchBoxSetEnabled.md) - [SyntaxColoring.ScriptSearchBox.SetText](SyntaxColoringScriptSearchBoxSetText.md)

[HTML Version](SyntaxColoringScriptSearchBoxSetRegEx.shtml)