import java.util.*;
import java.lang.*;
import java.io.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;


class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		String regex = "([0-9]+(?:\\.[0-9]+)?|[+]|[*]|[0-9]+)|\\S+";
        String string = "45 + 31.05 * 110 @ 54";

        Pattern pattern = Pattern.compile(regex);
        Matcher matcher = pattern.matcher(string);

        while (matcher.find()) {
            if (matcher.group(1) == null) {
            	// your Exception here
            	//throw new Exception("No match!");
                System.out.println(matcher.group() + " no match");
            } else {
                System.out.println(matcher.group(1) + "  match");
            }
        }
	}
}