You can try escaping your }
: -
"\.(.*)\}" // escaping `}` not needed in Java
I have no idea why it doesn't work in android
, but in Java
it works fine without escaping
it.
However, if you are using an opening curly braces, then even in Java you would need to escape it: -
"\.(.*)\{" // escaping `{` needed even in Java
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…