正则表达式fina双引号中的字符串 [英] Regex to fina double quote in the string

查看:104
本文介绍了正则表达式fina双引号中的字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我有以下格式的字符串 -



apple |芒果||奥兰ge|豌豆| ch



我想以下列格式获取数据 -



apple|芒果||橙色|桃子



所以基本上我想要一个正则表达式来识别双引号或管道(只有这两个字符) )其 BOTH 侧有一个字符(az或AZ或数字0-9)(Oran ge和Pea | ch)并用空白替换它。



非常感谢您的帮助。

Hi,

I've a string in the below format -

"apple"|"Mango"|""|"Oran"ge"|"pea | ch"

I want to get the data in the following format -

"apple"|"Mango"|""|"Orange"|"peach"

So basically I want a regular expression to identify a double quote or a pipe (and only these two chars) which has a char(a-z or A-Z or a number 0-9) on its BOTH sides (Oran"ge and Pea | ch) and replace it with a blank.

Thanks a lot for your help.

推荐答案

请参考下面的链接可能对您有用< br $>


http:/ /stackoverflow.com/questions/12586340/regex-to-find-special-characters-in-java [ ^ ]
Please refer below link may be useful for you

http://stackoverflow.com/questions/12586340/regex-to-find-special-characters-in-java[^]


这篇关于正则表达式fina双引号中的字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆