How to edit a text string with wild card chars?

so say i have a Duration/Length text string like this ...

(0345min)

as you can see, it is missing its separator
(i accidently deleted it when i did a global replace of '_')

now if i could use normal wild cards that would be quite simple

replace ??min) > -??min)

but it seems that i can't use wild cards, and i find no mention of 'wild cards'

so ..

  1. if i CAN use wild cards (w/o Regex), what is the correct syntax?

  2. if i CAN'T use wild cards, what can i do?

i assume only a Regex expresssion, but despite reading a lot of Regex examples, i still can't get my head around a string of Regex. :frowning:

To get that separated with an underscore:
$regexp('(0345min)',(\d\d)(\d\d),$1_$2)
leads to
(03_45min)
Alternatively use an action of the type "Replace with regular expression" for the field
Search string: (\d\d)(\d\d)
Replace with: $1_$2

not sure this helps or applies here :frowning:

so we have a text string '(****min)' in File Name (and Title)

so '****' is variable

AND text both before and after is variable AND of variable length

so we need to identify that text string in File Name and Title and then insert some separator '-'

so the only fixed text string we have to work with is 'min '

so we need to extract the string (four numerals) in front (LHS) of 'min)'

and insert separator '-'

????

Have you tried the suggestion?

i see you say that "the Converter can work with a fixed string in a variable position" so i will try to work out how that works

Exactly.
But the numbers that you apparently refer to, aren't a fixed string like "(NORM)".
So instead, you look for a pattern (and not a string that stays as it is) which consists of 4 digits, described by

which you group into 2-and-2 digits. And then you insert the separator between the groups.

And what was the result?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.