使用Java处理表达式字符串[toLower,toUpper,substring,replace和concat]

时间:2019-07-17 13:41:15

标签: java

我有一个正则表达式,其中包含toLower,toUpper,substring,replace和concat函数的任意组合,

例如

String inputString = "toUpper(replace(concat(subString(concat(toUpper(\"patil\"),toLower(\"PATIL\")),0,4),subString(concat(toUpper(\"Patil\"),toLower(\"ASHWINI\")),4,11)),\"patil\",\"Chavhan\"))";

或outputString = CHAVHANASHWINI。

表达式输入字符串可以具有五个函数的许多组合[toLower,toUpper,子字符串,replace和concat]。

如何使用Java中上述5个函数的任意随机组合来处理字符串?

0 个答案:

没有答案