Код: Выделить всё
Pattern p = Pattern.compile("([\\w.]+)\\W+=\\W+([\\w.]+)");
Matcher m = p.matcher("something = 1.21 and another = 2 && something else == 123?");
while (m.find())
System.out.printf("'%s', '%s'%n", m.group(1), m.group(2));
< /code>
output: < /p>
'something', '1.21'
'another', '2'
'else', '123'
< /code>
< /blockquote>
Я пытаюсь пройти в "=" Только вместо просто "=", потому что я не хочу "==", чтобы появиться в списке. />
'something', '1.21'
'another', '2'
Подробнее здесь: https://stackoverflow.com/questions/564 ... with-space