Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    public static final String AVATAR_SIZE_REG = "_[0-9]{1,3}";
    public static final String MIDDLE_SIZE = "_100";

    public static String getMiddleAvatar(String source) {
        if (source == null)
            return null;
        return source.replaceAll(AVATAR_SIZE_REG, MIDDLE_SIZE);
    }
}