code_junkie

Regex to block all < in a String

Nov 13th, 2011
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. Pattern p = Pattern.compile(
  2. "(?<!\<select)>|<(?!s*selects*>)",
  3. Pattern.CASE_INSENSITIVE);
  4.  
  5. someString.replaceAll("<(?!select>)|(?<!\<select)>", "");
Add Comment
Please, Sign In to add comment