# How to edit a text string with wild card chars?

**URL:** <https://community.mp3tag.de/t/how-to-edit-a-text-string-with-wild-card-chars/61397>\
**Category:** Support\
**Created:** [June 26, 2023, 10:31pm UTC](https://community.mp3tag.de/t/how-to-edit-a-text-string-with-wild-card-chars/61397 "2023-06-26T22:31:28Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![dec](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dec/32/13699_2.png) [@dec](https://community.mp3tag.de/u/dec)\
**Post date:** [June 26, 2023, 10:31pm UTC](https://community.mp3tag.de/t/how-to-edit-a-text-string-with-wild-card-chars/61397/1 "2023-06-26T22:31:28Z")

</div>

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. ☹

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [June 27, 2023, 5:10am UTC](https://community.mp3tag.de/t/how-to-edit-a-text-string-with-wild-card-chars/61397/2 "2023-06-27T05:10:09Z")

</div>

> [@dec](#):
>
> (0345min)

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`

---

<div class="post-metadata">

**Author:** ![dec](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dec/32/13699_2.png) [@dec](https://community.mp3tag.de/u/dec)\
**Post date:** [June 28, 2023, 12:56pm UTC](https://community.mp3tag.de/t/how-to-edit-a-text-string-with-wild-card-chars/61397/3 "2023-06-28T12:56:22Z")

</div>

not sure this helps or applies here ☹

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 ' **-**'

????

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [June 28, 2023, 12:57pm UTC](https://community.mp3tag.de/t/how-to-edit-a-text-string-with-wild-card-chars/61397/4 "2023-06-28T12:57:24Z")

</div>

Have you tried the suggestion?

---

<div class="post-metadata">

**Author:** ![dec](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dec/32/13699_2.png) [@dec](https://community.mp3tag.de/u/dec)\
**Post date:** [June 28, 2023, 1:00pm UTC](https://community.mp3tag.de/t/how-to-edit-a-text-string-with-wild-card-chars/61397/5 "2023-06-28T13:00:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [June 28, 2023, 1:05pm UTC](https://community.mp3tag.de/t/how-to-edit-a-text-string-with-wild-card-chars/61397/6 "2023-06-28T13:05:06Z")

</div>

> [@dec](#):
>
> a fixed string in a variable position

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

> [@ohrenkino](#):
>
> Search string: `(\d\d)(\d\d)`

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

> [@ohrenkino](#):
>
> Replace with: `$1_$2`

> [@ohrenkino](#):
>
> Have you tried the suggestion?

And what was the result?

---

<div class="post-metadata">

**Author:** ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)\
**Post date:** [July 28, 2023, 1:05pm UTC](https://community.mp3tag.de/t/how-to-edit-a-text-string-with-wild-card-chars/61397/7 "2023-07-28T13:05:29Z")

</div>

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