My task is to find everything inside a curly bracket using coldfusion.
So for example if the string is like this – “Approval request from {user_first_name} {user_last_name} of {user_company}”
then I should be able to get back {user_first_name},{user_last_name} and {user_company}.
I tried doing it using reMatch and some regular expressions I found online but they did not work.
Anyone has any idea?
P.S: I tried the regular expressions given here – Regex to get string between curly braces "{I want what's between the curly braces}" but that returned an empty string.
Here’s what seems to work for me:
Without a code sample, I can’t see what was going wrong, but this works on CF 9.0.1, hope that helps