About 209,000 results
Open links in new tab
  1. Using regular expressions to extract a value in Java

    I want to extract the text in [some number] using the Java regex classes. I know roughly what regular expression I want to use (though all suggestions are welcome).

  2. How to match "any character" in regular expression?

    Feb 24, 2023 · For reference, from regular-expressions.info/dot.html: "JavaScript and VBScript do not have an option to make the dot match line break characters. In those languages, you can …

  3. How to check if a string contains only digits in Java?

    17 Using regular expressions is costly in terms of performance. Trying to parse string as a long value is inefficient and unreliable, and may be not what you need. What I suggest is to simply …

  4. java - List of all special characters that need to be escaped in a ...

    Jan 3, 2013 · 4 Assuming that you have and trust (to be authoritative) the list of escape characters Java regex uses (would be nice if these characters were exposed in some Pattern …

  5. How can I provide an OR operator in regular expressions?

    Nov 28, 2012 · While the alternation operator is the answer to "what is the alternation operator in regex", there are many more nuances in using it inside regular expressions.

  6. java - What does regular expression \\s*,\\s* do? - Stack Overflow

    0 \\s+ this regular expression works when u want to skip one or more white spaces in the string Consider you wanna store all the words in an array u can write like this String [] words = …

  7. How to escape text for regular expression in Java?

    Sep 12, 2008 · 364 Does Java have a built-in way to escape arbitrary text so that it can be included in a regular expression? For example, if my users enter "$5", I'd like to match that …

  8. Escaping special characters in Java Regular Expressions

    May 19, 2012 · 46 Is there any method in Java or any open source library for escaping (not quoting) a special character (meta-character), in order to use it as a regular expression? This …

  9. java - Regular Expressions on Punctuation - Stack Overflow

    Jul 29, 2012 · So I'm completely new to regular expressions, and I'm trying to use Java's java.util.regex to find punctuation in input strings. I won't know what kind of punctuation I might …

  10. java - Regular expression include and exclude special characters ...

    Apr 16, 2012 · Regular expression include and exclude special characters Asked 13 years, 8 months ago Modified 1 year, 9 months ago Viewed 233k times