I'm trying to do the following: I have a string type this:
String req="Intel Core i7-8700K 3.7 Ghz BOX";
String req2="Procesador AMD Ryzen 5 2600X 4.2 Ghz";
What I want is to extract the part that says "3.7 Ghz" and "4.2 Ghz" in a string. These are a couple of examples, so it does not help me to count characters, since as you can see, they change their position. What is always maintained is that I want to get the same number of characters before Ghz ... Can you guide me on how to do it?
The only thing I have is this, but it does not work for me in this case ...
int fin = REQprocesador.indexOf("GHz", inicio + 1);
Thanks!