INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Regex to find the movement  (Read 987 times)

Flavio61

  • Recent member
  • *
  • Posts: 24
Regex to find the movement
« on: October 24, 2013, 12:49:23 pm »

Hi all,
to better manage my library of classical music I created a new field called "movement" in which store the description of the composition's movements. I would like to do this automatically by taking the value from the "Name" field. All my tracks have the "Name" field formatted like this:

War Requiem, Op. 66: I. Eternal rest, a. Eternal rest

In particular, before the description of the movement there is always the sign ":". I'm sure thet with a Regex expression I can extract everything that comes after ":" and enter it in the "movement" field but I'm not able to build the expression.

Any help. Thank's.
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Regex to find the movement
« Reply #1 on: October 24, 2013, 02:12:15 pm »

For this case, you can just use the simpler ListItem():

   ListItem([Name], 1, :)

This will give you the stuff after the first : character.  Use instead:

   ListItem([Name], 1, :/ )

if you want to strip the leading space as well.
Logged
The opinions I express represent my own folly.
Pages: [1]   Go Up