Answer the question
In order to leave comments, you need to log in
What regular expression can be used to find the text between +?
There is a reaction
KMnO4 + HCl = KCl + MnCl2 + Cl2 + H2O
how, using a regular expression, you can get substances from it that stand after the equal sign? (the "+" sign must be removed)
Answer the question
In order to leave comments, you need to log in
Why is there a regular? Split string on =, split second part on +.
The specific implementation depends on the programming language. For example in PHP:
$str = 'KMnO4 + HCl = KCl + MnCl2 + Cl2 + H2O';
$list = explode('+', explode('=', str_replace(' ', '', $str))[1]);
print_r($list);
Array
(
[0] => KCl
[1] => MnCl2
[2] => Cl2
[3] => H2O
)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question