regular expression remove font-size

recent I made regular expression for removing font-size tag in style attribute

this is what I made

        private static String removeFontSizeFromStyle(String styleContent) {
  String fontPattern = "[fF][oO][nN][tT]-[sS][iI][zZ][eE]\\s*:\\s*[0-9.]+[a-zA-Z%]*\\s*+;?";

  return styleContent.replaceAll(fontPattern, "");
 }

Comments

Popular posts from this blog

Project euler 169 found clue

Floyd-Warshall's algorithm