Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    /**
     * Returns a regular then marking word boundaries and ignoring case.
     * <p>
     * Example:<br />
     * "group\\s+by" becomes "\\b(?:(i?)group\\s+by)\\b"
     * </p>
     */
    public static String word(String word) {
        return "\\b((?i)" + word.replaceAll("\\s+", "\\\\s+") + ")\\b";
    }
}