Author Topic: Simple Regex problem  (Read 498 times)

ThY

  • Full Member
  • ***
  • Posts: 148
Hello, i'm stuck.
I would like to detect when a tag contains more than one comma.

So i tried this:

$Contains(<Langue>,"(.*,.*){2,}")

So if my <Langue> tag contains this:
Allemand, Anglais, Français

Souldn't it return as true ?

Here is a screenshot:


Thanks for the help :)

The Incredible Boom Boom

  • Sr. Member
  • ****
  • Posts: 1282
The $IsMatch() function is used for regular expressions.

ThY

  • Full Member
  • ***
  • Posts: 148
Ok my bad, at first i did my tries with $IsMatch, but with other regex.
And as it didn't work, i switched to $Contains for whatever reasons / testing purposes.

So this is working... i was focused on the regex part...

Thank you ^^'

ThY

  • Full Member
  • ***
  • Posts: 148
Ok it seems that my real problem was that i wrote the code with tabulations on SublimeText (an external program).
I had to put everything on a single line in Musicbee for it to work.