- 출처 :
http://stackoverflow.com/questions/8308926/regex-for-matching-complete-substring -
http://stackoverflow.com/questions/8308926/regex-for-matching-complete-substring -
* URL에서 http:// 부분을 제거하는 예제 (Java)
String regex = "^(?:https?://)?";
String s = "http://www.google.com";
s = s.replaceAll(regex, "");
System.out.println(s);
* 문자열에서 마지막 콤마(컴마) 삭제 (Javascript)
selector = selector.replace(/,$/, '');