str.replaceAll("\\^([0-9]+)", "<sup>$1</sup>");
More Related Contents:
- What do the characters ((?:(?:(?: mean in pattern-matching? [duplicate]
- Java: splitting a comma-separated string but ignoring commas in quotes
- Split string with dot as delimiter
- Use String.split() with multiple delimiters
- Java how to replace 2 or more spaces with single space in string and delete leading and trailing spaces
- Java Regex Capturing Groups
- SCJP6 regex issue
- Get the index of a pattern in a string using regex
- Regular expression for excluding special characters [closed]
- How to determine if a number is a prime with regex?
- Java regex to extract text between tags
- java.lang.StackOverflowError while using a RegEx to Parse big strings
- Split regex to extract Strings of contiguous characters
- Java regex – overlapping matches
- Generic support for ISO 8601 format in Java 6
- Find everything between two XML tags with RegEx
- Parsing CSV input with a RegEx in java
- simple java regex throwing illegalstateexception [duplicate]
- Range of valid character for a base 64 encoding
- Regex: ?: notation (Question mark and colon notation) [duplicate]
- Whats the difference between \z and \Z in a regular expression and when and how do I use it?
- Regex reuse a pattern to capture multiple groups?
- Regex for checking if a string is strictly alphanumeric
- Java Regex pattern that matches in any online tester but doesn’t in Eclipse
- Java Pattern Matcher: create new or reset?
- How can split a string which contains only delimiter?
- Regular expression to get an attribute from HTML tag
- Issue with Java Regex \b
- Java’s Scanner vs String.split() vs StringTokenizer; which should I use?
- java regex pattern unclosed character class