Author Topic: Can you help me with this Regular Expressions code?...  (Read 161 times)

barcewillian

  • Newbie
  • *
  • Posts: 11
What happens is that I want to make a <virtual tag> so that from the tag <playlist> only copies "♥☻" and "TB" (without the quotes) when <playlist> has it, and when the tag <playlist> is empty, it outputs "NO" (without the quotes).

I vaguely made an attempt with my ignorance in Regular Expressions, but when the playlist is empty I get the letter "t" (I show it in the screenshot)



I would greatly appreciate your help.
Last Edit: March 05, 2024, 02:18:31 AM by barcewillian

Zak

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 2466
It's a bit unclear what you're doing, but try this:

Code
$IsNull(<Playlist>,NO,$If($IsMatch(<Playlist>,".*♥☻.*"),♥☻,)$If($IsMatch(<Playlist>,".*TB.*"),TB,))

This will show:
NO if a track is not in a playlist.
♥☻ and/or TB if a track is in a playlist whose name contains those characters.

Nothing is displayed if a track is in a playlist whose name doesn't meet the other naming criteria.
You can change this by adding a value after the last comma.
Bee excellent to each other...

barcewillian

  • Newbie
  • *
  • Posts: 11
It's a bit unclear what you're doing, but try this:

Code
$IsNull(<Playlist>,NO,$If($IsMatch(<Playlist>,".*♥☻.*"),♥☻,)$If($IsMatch(<Playlist>,".*TB.*"),TB,))

This will show:
NO if a track is not in a playlist.
♥☻ and/or TB if a track is in a playlist whose name contains those characters.

Nothing is displayed if a track is in a playlist whose name doesn't meet the other naming criteria.
You can change this by adding a value after the last comma.
haha... thank you wise man... you have understood it very nice...



At any time, i start studying about this. ♥☺