About 4,090,000 results
Open links in new tab
  1. Java Regex a-z, A-Z, 0-9 and (.) (_) (-) - Stack Overflow

    Oct 21, 2011 · Writing a simple regex, but I've never been very good at this. What I'm trying to do is check a string (filename) to make sure it only contains a-z, A-Z, 0-9 or the special characters …

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

    @Lupos \s is regex for “whitespace”. To code a literal backslash in Java, you must escape the backslash with another backslash, so to code \s in the regex, you must code "\\s" in your …

  3. regex - Using regular expressions to extract a value in Java - Stack ...

    [some text] [some number] [some more text] 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 …

  4. Java String.split() Regex - Stack Overflow

    Mar 25, 2012 · Java String.split () Regex Asked 13 years, 8 months ago Modified 11 years, 7 months ago Viewed 375k times

  5. java - Regex pattern including all special characters - Stack Overflow

    Aug 5, 2013 · I want to write a simple regular expression to check if in given string exist any special character. My regex works but I don't know why it also includes all numbers, so when I …

  6. Regex date format validation on Java - Stack Overflow

    I'm just wondering if there is a way (maybe with regex) to validate that an input on a Java desktop app is exactly a string formatted as: "YYYY-MM-DD".

  7. java - Regex: ?: notation (Question mark and colon notation)

    Dec 8, 2018 · The regex compiles fine, and there are already JUnit tests that show how it works. It's just that I'm a bit confused about why the first question mark and colon are there.

  8. java - Getting the text that follows after the regex match - Stack …

    Dec 26, 2015 · Getting the text that follows after the regex match Asked 14 years, 9 months ago Modified 9 years, 11 months ago Viewed 285k times

  9. java - How to extract a substring using regex - Stack Overflow

    While substring looks for a specific string or value, regex looks for a format. It's more and more dynamic. You need regex, if you are looking for a pattern instead of a special value.

  10. java - Replacing all non-alphanumeric characters with empty …

    Nov 26, 2009 · 12 Java's regular expressions don't require you to put a forward-slash (/) or any other delimiter around the regex, as opposed to other languages like Perl, for example.