Answers for "how to select string between double quotes in java"

1

regex get string between quotes java

Pattern p = Pattern.compile("\"([^\"]*)\"");
Matcher m = p.matcher(line);
while (m.find()) {
  System.out.println(m.group(1));
}
Posted by: Guest on April-02-2020
0

how to get a string in two quotes

#
# START of getting the substring
#
start = line.find("\"") + len("\"")
end = line.find("*\"")
substring = line[start:end]
print(substring)
plaintxt += substring
substring = ""
print(plaintxt)
#
# END of getting the substring
#

# This will find a string in the middle of two quotes 
# with a star at the end
# Like this: (START --->) " This is your string (END --->) *"
Posted by: Guest on July-03-2020

Code answers related to "how to select string between double quotes in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language