INTERACT FORUM

Please login or register.

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

Author Topic: Expression Language Question  (Read 1328 times)

timwtheov

  • Galactic Citizen
  • ****
  • Posts: 354
Expression Language Question
« on: September 30, 2017, 01:15:07 pm »

Hi all,

I'm trying create an expression, probably for a calculated field, that will a) count the number of characters in a string of varying length up to a colon or a number (depending on the string) and then b) something like a "RemoveLeft()" of all those characters to the left of the colon or number. I would just do this manually with "Find and Replace," but I have a lot of different strings (in [Name]) to alter. I was thinking I'd probably need some kind of Count + a Regex (the latter to find the colon or number), all nested within a RemoveLeft. I'm just not sure how to make it stop at the colon or number. Here's a more specific example:

[Name] field currently:

String Quartet No. 3 in D Major, Op. 18 No. 3: IV. Presto

I want to remove everything to the left of "IV." so that I'm left with only

IV. Presto

because I want to substitute what came from the auto metadata lookup with the "Work Name" I use for each classical work, i.e.,

String Quartet No. 3 in D major, Op. 18/3: IV. Presto

just so everything is standardized (I know, I'm anal).


Any suggestions from Ferday or Blgentry?

Thanks!
Logged

RD James

  • Citizen of the Universe
  • *****
  • Posts: 1871
Re: Expression Language Question
« Reply #1 on: September 30, 2017, 02:25:22 pm »

Logged

timwtheov

  • Galactic Citizen
  • ****
  • Posts: 354
Re: Expression Language Question
« Reply #2 on: September 30, 2017, 03:14:45 pm »

Wow! Thanks! Worked perfectly! Didn't even notice this function in there!
Logged
Pages: [1]   Go Up