Somehow I am missing how you treat the result.
Or: I can see the source string - but what should the target string look like?
Also, I am used to regular expressions that use a $1 etc. as result output unless you want to delete something.
When I test $regexp('5:01AM (The Pros and Cons of Hitch Hiking, Pt. 10)',(.+)(?=\s()\s?((([a-zA-Z0-9 .,]+?))),$1)
I get a syntax error.
So: does the forum formatter show everything correctly? It may be advisable to enclose the expression in accent grave.
You describe a pattern with 3 parts but only the third gets treated.
I do not think that you can "replace" that but you have "Format value" the field again with a separate string function for each part that you then have to isolate with a regular expression each.
If you use $caps() you may have to define the characters that determine the word separator.
I tried the following: $caps3($regexp('5:01AM (The Pros and Cons of Hitch Hiking, Pt. 10)','(.+) (\(.)(.*,.*\))',$1 $2$3),'(')
and got
5:01am (The pros and cons of hitch hiking, pt. 10)
In my example i isolated the third part for testing purposes only. Although your explanation makes sense i'm still trying to understand why this method is not suitable for achieving such result:
I tried it in Convert>Tag-Tag with $regexp()
I am not quite sure if the preview works allright because that never shows any case conversion ...
Please not that I appended function to $caps3($3,'(')
to set the ( as word separator.
as I said: I do not think that you can use the $-functions in a "replace with" statement as this is not a format string.
You would have to use a "Format value" action and 3 separate regular expressions to isolate the 3 parts so that you can treat the case of "Bracket plus character" individually.
I use $-functions in a similarly fashion and they usually output the desired result. I'm quite aware that my regular expressions are sub-par but they work as intended. For instance:
Having both regex syntax and the scripting functions (where the comma is a special character) here has limits.
So if you have a comma in your tag field it breaks the function.