Text.RemovePrefix
-----------------

Removes the prefix from text.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Text](component_Text.md) | [6.1](newinversion61.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "Text.RemovePrefix"; Text; Prefix { ; CaseSensitive } ) 

**MBS**( **"Text.RemovePrefix";** /\* Removes the prefix from text. \*/  
**$Text**; /\* The text to check.e.g. "&gt;Hello World" \*/   
**$Prefix**; /\* The prefix to remove.e.g. "&gt;" \*/   
**$CaseSensitive**) /\* Optional; Pass 1 to check case sensitive.  
Default is 0 for case insensitive.e.g. 0 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| Text | The text to check. | "&gt;Hello World" |  |
| Prefix | The prefix to remove. | "&gt;" |  |
| CaseSensitive | Pass 1 to check case sensitive.   Default is 0 for case insensitive. | 0 | Optional |

### Result

Returns text.

### Description

Removes the prefix from text.  
  
This function works on pure text, so any text style is lost.  
### Examples

Removes prefix:

 MBS ( "Text.RemovePrefix"; "&gt;Hello World"; "&gt;")  
Creates directory and shows error:

 Set Variable \[$r ; Value:MBS ("[Files.CreateDirectory](FilesCreateDirectory.md)"; $path )\]  
If \[MBS ("IsError")\]  
 Show Custom Dialog \["Failed to create directory"; MBS ("Text.RemovePrefix"; $r ; "\[MBS \] ")\]  
 Exit Script \[\]  
End If  
Remove apple:

 MBS ( "Text.RemovePrefix"; "🍎🍓🍒"; "🍎")  
<small>  
Example result: 🍓🍒</small>### See also

- [AVExport.ExportAsynchronously](AVExportExportAsynchronously.md)
- [Events.AuthorizationStatusForEntityType](EventsAuthorizationStatusForEntityType.md)
- [Events.RequestAccessToEntityType](EventsRequestAccessToEntityType.md)
- [ImageCapture.OpenDevice](ImageCaptureOpenDevice.md)
- [ImageCapture.RequestScan](ImageCaptureRequestScan.md)
- [ImageCapture.RequestSelectFunctionalUnit](ImageCaptureRequestSelectFunctionalUnit.md)
- [ImageCapture.SetParameter](ImageCaptureSetParameter.md)
- [List.RemovePrefix](ListRemovePrefix.md)
- [QTExport.OpenExporter](QTExportOpenExporter.md)
- [RSA.Verify](RSAVerify.md)

### Example Databases

- [CURL/Email/Email Parser and Preview](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/CURL/Email/Email%20Parser%20and%20Preview.shtml#2ScriptAnchor_)
- [CURL/Email/IMAP Email](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/CURL/Email/IMAP%20Email.shtml#4ScriptAnchor_)
- [Encryption and Hash/RSA Sign and Verify](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Encryption%20and%20Hash/RSA%20Sign%20and%20Verify.shtml#3ScriptAnchor_)
- [Mac and iOS/Events/Events Changes](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/Events/Events%20Changes.shtml#1ScriptAnchor_)
- [Mac and iOS/Events/Events Create Event](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/Events/Events%20Create%20Event.shtml#2ScriptAnchor_)
- [Mac and iOS/Events/Events Create Reminder](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/Events/Events%20Create%20Reminder.shtml#2ScriptAnchor_)
- [Mac and iOS/Events/Events Import](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/Events/Events%20Import.shtml#3ScriptAnchor_)
- [Mac and iOS/Events/Events Sync](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/Events/Events%20Sync.shtml#2ScriptAnchor_)
- [Mac only/ImageCapture/ImageCapture](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20only/ImageCapture/ImageCapture.shtml#4ScriptAnchor_)
- [Mac only/Movies/AVAsset Export Session](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20only/Movies/AVAsset%20Export%20Session.shtml#2ScriptAnchor_)

### Blog Entries

- [Print WebViewer on macOS in FileMaker](https://www.mbsplugins.de/archive/2017-11-28/Print_WebViewer_on_macOS_in_Fi/monkeybreadsoftware_blog_filemaker)
- [ImageCapture functions for Mac OS X](https://www.mbsplugins.de/archive/2016-09-12/ImageCapture_functions_for_Mac/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 6.1pr4](https://www.mbsplugins.de/archive/2016-03-03/MBS_FileMaker_Plugin_version_6/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 28th February 2016 , last changed 31st January 2023

  
[Text.RemovePostfix](TextRemovePostfix.md) - [Text.ReplaceAll](TextReplaceAll.md)

[HTML Version](TextRemovePrefix.shtml)