1
I’m trying to return the information from a String.
What I need is to pass a String parameter and return the information that is in the indicated places.
Ex.:
String FraseParametro = "<R1> casou com <R2>, e traiu ela com <R3>.";
String Frase = "João Pedro casou com Maria, e traiu ela com Joaquina Fofa.";
retorno = {{"<R1>","João Pedro"},{"<R2>", "Maria"}, {"<R3>", "Joaquina Fofa"}}
How can I do that?
My problem is that there are several different sentences and the position of <R >
are different.
I don’t know if this can help you, but the <R1> is between the beginning of the string and the married word. The <R2> is between the comma and the <R3> is between the com and the endpoint. ;)
– Rubico