Unfortunately, despite having tried to learn regex at least one time a year for as many years as I can remember, I always forget as I use them so infrequently. This year my new year's resolution is to not try and learn regex again - So this year to save me from tears I'll give it to Stack Overflow. (Last Christmas remix).
I want to pass in a string in this format {getThis}
, and be returned the string getThis
. Could anyone be of assistance in helping to stick to my new year's resolution?
Related questions on Stack Overflow:
str.replace('{','').replace('}','').trim()
– Shady