import type.lang.*;

public class RegexExample
{
	public static void main(String[] args)
	{
		// Regex example (see text, p. 165)
		String regex = "[^0-9]*[+-]?[0-9]+[^0-9]*";
		IO.print("Enter string: ");
		String s = IO.readLine();
		if (s.matches(regex))
			IO.println("New string: " + s.replaceAll("-?[0-9]+", ""));
	}
}
