Question

How to remove characters from a string ?


You have a list of strings like:

{"ABHello", "ABAppian", "ABWorld"}

Each value starts with "AB", and the goal is to remove this prefix from every string.

A
Anonymous
April 9, 2026

Answer

We can achieve this using a!forEach() along with the mid() and len() functions.

a!localVariables(
local!array: {"ABHello", "ABAppian", "ABWorld"},

a!forEach(
items: local!array,
expression: mid(fv!item, 3, len(fv!item)-2)
)
)

Explanation

  1. a!forEach() iterates through each item in the list
  2. fv!item represents the current string
  3. mid() extracts a substring:
  4. Starts at position 3 (skipping "AB")
  5. Extracts the remaining characters dynamically using len()

This ensures that no matter the length of the string, the first two characters are always removed.




1775745908891-cjepo7yw91b.png




JuniorExpressions#coding
Loading comments...