Ask AI
Skip to main content

Multi strip

Function: Multi strip

This action helps you clean up text by removing specific words or phrases from the beginning or end of a larger piece of text. It's useful for standardizing data, removing unwanted prefixes or suffixes, or preparing text for further processing.

Input

  • Text: The main piece of text you want to clean. (Type: Text, Required)
  • To strip: A list of words or phrases that you want to remove from the beginning or end of the main text. (Type: List of values, Required)

Output

  • Result: The name of the variable where the cleaned text will be stored. By default, this is named "RESULT". (Type: Text)

Execution Flow

Real-Life Examples

  1. Cleaning Product Codes: Imagine you have product codes that sometimes include "SKU-" or "-PROD" at the beginning or end, and you want to standardize them.

    • Inputs:
      • Text: "SKU-Laptop-PROD"
      • To strip: ["SKU-", "-PROD"]
      • Result: (default) "RESULT"
    • Result: The variable "RESULT" will contain "Laptop".
  2. Normalizing User Input: A user might enter a city name with extra spaces or common prefixes like "City of ". You want to get just the city name.

    • Inputs:
      • Text: " City of London "
      • To strip: [" ", "City of "]
      • Result: "CleanedCity"
    • Result: The variable "CleanedCity" will contain "London".
  3. Processing File Names: You have a list of file names, and some might have common suffixes like ".txt" or ".csv" that you want to remove to get the base name.

    • Inputs:
      • Text: "report_data.csv"
      • To strip: [".txt", ".csv"]
      • Result: "FileName"
    • Result: The variable "FileName" will contain "report_data".