我正在尝试从以下类型的字符串中提取消息,
Error_Message('The value 1,2 and 3 that you have entered is invalid.');
使用以下正则表达式,
\s*(\w+):\s*(?:'\s*(?:\|\S*)'\s*|[^'])+
'
但问题是这在某些情况下会失败,例如,
General_Message('Sample message value :p you have '||CHAR(10)||'entered is invalid.', FunctionY('xyz', param2) );
General_Message(' The percent may not be negative.',FunctionZ('xyz', parameter2));
需要你们的支持来解决这个问题。
提前致谢!
最佳答案
关于java - 提取消息中包含连接字符的字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23265444/