QuickList.MatchesPrefix
-----------------------

Finds list entries which have a given prefix text.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [List](component_List.md) | [5.4](newinversion54.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "QuickList.MatchesPrefix"; ListRef; Text { ; Flags } ) 

**MBS**( **"QuickList.MatchesPrefix";** /\* Finds list entries which have a given prefix text. \*/  
**$ListRef**; /\* The reference to the list returned from [QuickList.New](QuickListNew.md) function.e.g. $List \*/   
**$Text**; /\* The text to find.e.g. "Hello" \*/   
**$Flags**) /\* Optional; Pass 1 to return result as new QuickList.   
This new list must be freed later using [QuickList.Release](QuickListRelease.md) function. Pass 0 (Default) to modify the list in the List1 parameter.  
Add 2 to split. This is only useful with first option together (so pass 3 for both). Matching entries will be in new list and non matching entries will stay in old list.  
Add 4 to reverse operation (NOT).e.g. 0 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| ListRef | The reference to the list returned from [QuickList.New](QuickListNew.md) function. | $List |  |
| Text | The text to find. | "Hello" |  |
| Flags | Pass 1 to return result as new QuickList.    This new list must be freed later using [QuickList.Release](QuickListRelease.md) function. Pass 0 (Default) to modify the list in the List1 parameter.   Add 2 to split. This is only useful with first option together (so pass 3 for both). Matching entries will be in new list and non matching entries will stay in old list.   Add 4 to reverse operation (NOT). | 0 | Optional |

### Result

Returns OK, list or error.

### Description

Finds list entries which have a given prefix text.  
Comparison is case insensitive.  
### Examples

Finds list entries with same prefixes:

 Set Variable \[$list ; Value:MBS ( "[QuickList.New](QuickListNew.md)"; "Hello¶World¶auto" )\]  
Set Variable \[$matchesList ; Value:MBS ( "QuickList.MatchesPrefix"; $list ; "w"; 0)\]  
Set Variable \[$text ; Value:MBS ( "[QuickList.GetList](QuickListGetList.md)"; $list )\]  
Set Variable \[$r ; Value:MBS ( "[QuickList.Release](QuickListRelease.md)"; $list )\]  
Show Custom Dialog \["result"; $text \]  
Find entries not matching in prefix:

 Set Variable \[$list ; Value:MBS ( "[QuickList.New](QuickListNew.md)"; "Hello¶World¶auto" )\]  
Set Variable \[$matchesList ; Value:MBS ( "QuickList.MatchesPrefix"; $list ; "w"; 4)\]  
Set Variable \[$text ; Value:MBS ( "[QuickList.GetList](QuickListGetList.md)"; $list )\]  
Set Variable \[$r ; Value:MBS ( "[QuickList.Release](QuickListRelease.md)"; $list )\]  
Show Custom Dialog \["Result"; $text \]  
### See also

- [List.MatchesPrefix](ListMatchesPrefix.md)
- [QuickList.GetList](QuickListGetList.md)
- [QuickList.MatchesPostfix](QuickListMatchesPostfix.md)
- [QuickList.MatchesSubString](QuickListMatchesSubString.md)
- [QuickList.New](QuickListNew.md)
- [QuickList.Release](QuickListRelease.md)
- [QuickList.RemovePrefix](QuickListRemovePrefix.md)

### Blog Entries

- [MBS FileMaker Plugin, version 6.0pr5](https://www.mbsplugins.de/archive/2016-01-02/MBS_FileMaker_Plugin_version_6/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 5.4pr7](https://www.mbsplugins.de/archive/2015-11-21/MBS_FileMaker_Plugin_version_5/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 20th November 2015 , last changed 14th December 2023

  
[QuickList.MatchesPostfix](QuickListMatchesPostfix.md) - [QuickList.MatchesSubString](QuickListMatchesSubString.md)

[HTML Version](QuickListMatchesPrefix.shtml)