Beluna
September 17, 2011, 3:33pm
1
How to write action to change 1st letter after space to Cap:
Example listed under the Performers Field:
Album Credits:
Bee Gees producer
John Blanch assistant Engineer
Brown saxophone, Guitar
Gary Brown saxophone
Dennis Byron drums, Group Member
(If it doesn't display correctly there is a Tab/Space between the individual name and their role, which causes the 1st letter after the white space to be lower case instead of Uppercase).
producer should be Producer.
Action type: Replace with regular expression
Field: YOUR REQUIRED FIELD
Regular expression: \b([\t]+|\s|\s+[\t]+|[\t]+\s+|\s+[\t]+\s+)(\w)
Replace matches with: $caps($2) represents a space
[ ] case-sensitive comparison
This action should do the trick. It changes to all first letters after a space to upper and keeps the existing UPPER CASE. If you need an explanation how the regexp works let me know.
See attached results.
Ps. i've used "UNSYNCEDLYRICS" only for example.
Beluna
September 18, 2011, 7:29am
3
stevehero:
Action type: Replace with regular expression
Field: YOUR REQUIRED FIELD
Regular expression: \b([\t]+|\s|\s+[\t]+|[\t]+\s+|\s+[\t]+\s+)(\w)
Replace matches with: $caps($2) represents a space
[ ] case-sensitive comparison
This action should do the trick. It changes to all first letters after a space to upper and keeps the existing UPPER CASE. If you need an explanation how the regexp works let me know.
See attached results.
Ps. i've used "UNSYNCEDLYRICS" only for example.
It works but removes the space and adds "_" between words.
Example
Barry Gibbs[space]producer
Dennis Bryon[space]drums, Group Member
becomes
Barry_Gibbs_Producer
Dennis_Brown_Drums, Group Member
Does the Expression tells it to remove the space? I created the action group with all the characters in your example.
I would like to maintain space (tab) between individual and position
Bee Gees [ space ] Producer
Nick Blacona [space]Assistant Engineer
John Blanch [space] Assistant Engineer
Gary Brown [space] Saxophone
Thanks
I have said that the "_" represents a space in the above post.
Just add "$1" to the replace matches with instead of the " " (space character)
Action type: Replace with regular expression
Field: UNSYNCEDLYRICS
Regular expression: \b([\t]+|\s|\s+[\t]+|[\t]+\s+|\s+[\t]+\s+)(\w)
Replace matches with: $1$caps($2)
[ ] case-sensitive comparison
Beluna
September 18, 2011, 2:24pm
5
stevehero:
I have said that the "_" represents a space in the above post.
Just add "$1" to the replace matches with instead of the " " (space character)
Action type: Replace with regular expression
Field: UNSYNCEDLYRICS
Regular expression: \b([\t]+|\s|\s+[\t]+|[\t]+\s+|\s+[\t]+\s+)(\w)
Replace matches with: $1$caps($2)
[ ] case-sensitive comparison
Wow, i was replying to tell you I see my mistake and I see you wrote the same point... remove the _ and add a 1
Thanks
Beluna:
How to write action to change 1st letter after space to Cap: ...
Album Credits:
Bee Gees producer
John Blanch assistant Engineer
Brown saxophone, Guitar
Gary Brown saxophone
Dennis Byron drums, Group Member
(If it doesn't display correctly there is a Tab/Space between the individual name and their role, which causes the 1st letter after the white space to be lower case instead of Uppercase).
producer should be Producer.
Action: Format value
Field: YOUR_FIELD
Formatstring: $caps ( %YOUR_FIELD% , $char ( 9 ) $char ( 10 ) $char ( 32 ) )
From:
Bee Gees producer
Nick Blacona assistant engineer
John Blanch Assistant engineer
Gary Brown saxophone
Dennis Byron drums, Group member
To:
Bee Gees Producer
Nick Blacona Assistant Engineer
John Blanch Assistant Engineer
Gary Brown Saxophone
Dennis Byron Drums, Group Member
DD.20111019.1200.CEST