Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.BufferedReader;
- import java.io.IOException;
- import java.io.InputStreamReader;
- import java.util.regex.Pattern;
- public class ToUpperCase {
- public static void main(String[] args) throws IOException {
- BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
- String text = reader.readLine();
- text = Pattern.compile("<upcase>(.+?)</upcase>").matcher(text).replaceAll(matchResult -> matchResult.group(1).toUpperCase());
- System.out.println(text);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment