Case Conversion;

Hi there,
I came across the following in the forums while looking for a solution to capitalise the first letter of every word within parenthesis.

Action: Replace with regular expression
Field: _ALL
Regular expression: ^(.*)$
Replace matches with: $caps2($1)
[ ] case-sensitive comparison

For some it works for others it doesn't. For example;

H.M.S. Pinafore: Act I. “We sail the ocean blue” (Sailors), became
H.M.S. Pinafore: Act I. "We Sail The Ocean Blue (Sailors), which is what I want.
However; H.M.S. Pinafore: Act I. “Hail, men-o’-war’s men” (Buttercup), became,
"H.M.S. Pinafore: Act I. “Hail

Any idea why this happens?

Prior to trying this, I simply used the installed case conversion action and this worked for capitalising after quotes. Now however, case conversion capitalises the first letter of each word except the first word. Also replacing quote marks with double apostrophes with a simple replace no longer works.
Any help would be gratefully received.
Regards,
embra 55

Hi embra55,

isn't this question the same that you posted in
Case conversion...
Please do not doublepost.

While testing you should not apply a formatstring against all tag-fields or against the filename.
Choose the tagfield TITLE, or better choose one tagfield TEST.
When the formatstring works well, then apply it to the tagfields, where it relates to.

The function $caps2 supports a second parameter (see "Mp3tag\help\main_scripting.html"), ...
which is a string of one or more characters, which each triggers upcasing.
In case of the single apostroph ' should be envolved, then the single apostroph must be written twice, because in the MP3tag Scripting Language the single apostroph is defined as the string delimiter.

Example ...
TEST <== La[y me 'do]wn

$caps2(%TEST%,'[]''') ==> La[Y me 'Do]Wn

DD.20160425.1420.CEST

I'Ll have to say that it'S unfortunate that an apostrophe trigger doesn'T work too well if fields contain colloquial English. That'S also true in French, j'Ai vu.

$caps2('H.M.S. Pinafore: Act I. “Hail, men-o’-war’s men” (Buttercup)',' -') ==> 'H.M.S. Pinafore: Act I. “Hail, Men-O’-War’s Men” (Buttercup)'

DD.20160426.0823.CEST