I'm working on a smart EditText where the user write a product and a price without any worries about formatting (e.g. "Pasta 0,50" or "0.50 tomato juice").
I'd like to separate the price from all the rest to have something like
String input = "Cheese 2,00 for Pizza";
String outputProduct = "Cheese for pizza";
String outputPrice = "2,00";
Usually it shouldn't be a thing, but I'm also considering of taking care if the price isn't at the very start or the very end of the string, so if it's in the middle.
I also have to deal with periods and comms in prices.. since not everyone use the same kind of format.
What I've tryed so far: answer from OscarRyz here but it seems to be not very related with what I'm trying to achieve. Also seen some array operations but my problem is to get the actual length of the price.
Any help would be very appreciated!