Kid3-cli - Way to remove characters when using folder names for tags

Before I begin just keep in mind that I am using these commands in a program that allows user to create tools out of them, meaning they could be applied to single or multiple files at once. I am trying to make these tools be as universal (be used in as many ways) as possible.
Also I am using ID3V2.3 where genre names can be custom.

When using folder/file names to fill in ID3 tags, I was wondering if there are certain things within an folder/files name that you didn’t want to include in the tag, is there a way to somehow remove them? Maybe something similar to the {ignore} or maybe some kind of Regex type of ability?

EXAMPLE FOLDER STRUCTURE
GENRE/ARTIST/ALBUM/## - TRACK.mp3

EXAMPLE - 01
Say the GENRE folders name is
1234 - APPLE
but you don’t want the "#### - " number prefix in the tag name

EXAMPLE - 02
Say the GENRE folders name is
underscoreAPPLE
but you don’t want the “_” underscore prefix in the tag name

EXAMPLE - 03
Say the GENRE folders name is
APPLE - 1234
but you don’t want the " - ####" number suffix in the tag name

I am just giving three examples above.
If names include prefix or suffix they will follow a pattern, meaning that they will have same amount of characters, so if there is a way to remove a specific number of characters from the beginning or end of names, that would work.

I have not tried this in a while but last I left off I was trying commands like
kid3-cli -c “totag ‘%{ignore} - %{genre}/%{artist}/%{album}/%{track} - %{title}’” %f
Was trying to see if I could get the {ignore} tag to remove the a "#### - " prefix, but couldn’t get this to work.

Thank you to anyone who reads this and for any help offered

For simple cases, %{ignore} works. For example

kid3-cli -c "totag '%{ignore} - %{genre}/%{artist}/%{album}/%{track} - %{title}'" 1234\ -\ APPLE/An\ Artist/An\ Album/02\ -\ A\ Title.mp3

For more complex cases, you can use a full regular expression with %{framename} in front of the capture parentheses, e.g.

kid3-cli -c "totag '[^-]+ - %{genre}(.*)/%{artist}(.*)/%{album}(.*)/%{track}(\d+) - %{title}(.*)'" 1234\ -\ APPLE/An\ Artist/An\ Album/02\ -\ A\ Title.mp3

In both cases, you will get the desired result:

$ kid3-cli -c get 1234\ -\ APPLE/An\ Artist/An\ Album/02\ -\ A\ Title.mp3 
File: MPEG 1 Layer 3 136 kbps 44100 Hz Joint Stereo
  Name: 02 - A Title.mp3
Tag 2: ID3v2.3.0
  Title         A Title
  Artist        An Artist
  Album         An Album
  Track Number  2/1
  Genre         APPLE