简体   繁体   English

java中的正则表达式提取双引号之间的字符串

[英]Regex in java to extract string between double quotes

Hi im able to read data between double quotes , but i stuck on this problem嗨,我能够读取双引号之间的数据,但我坚持这个问题

"13. The ""strange situation"" in child development is used to assess the infant's: (A) level of curiosity. (B) security of attachment. (C) ability to relate to strangers. (D) response to new types of stimulation. (E) developmental status with object constancy." 13.儿童发展中的“奇怪情况”用于评估婴儿的:(A)好奇心程度。(B)依恋的安全性。(C)与陌生人交往的能力。(D)对新类型的反应刺激。(E)具有对象恒定性的发育状态。”

I have to read data between double quotes ,but the problem is when the question itself has double quotes.我必须读取双引号之间的数据,但问题是问题本身有双引号。 How can i read the double double quotes within the double quotes ??如何读取双引号中的双双引号??

Is there any Regex for this是否有任何正则表达式

try this尝试这个

(.*)A\.(.*)B\.(.*)C\.(.*)D\.(.*)E\.(.*)

but be sure that your text contains only one : ABCD and E.但请确保您的文本只包含一个:ABCD 和 E。

otherwise you cannot solve this否则你无法解决这个问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM