About 6,970,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. 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 …

  3. 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 …

  4. 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.

  5. regex - Unicode equivalents for \w and \b in Java regular …

    Nov 29, 2010 · Java’s Regex Unicode Problems The problem with Java regexes is that the Perl 1.0 charclass escapes — meaning \w, \b, \s, \d and their complements — are not in Java …

  6. Replacing all non-alphanumeric characters with empty strings

    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.

  7. regex - Split Java String by New Line - Stack Overflow

    When you write a regex in the form of a Java String literal, you can use "\n" to pass the regex compiler a linefeed symbol, or "\\n" to pass it the escape sequence for a linefeed.

  8. Java Regex - Using String's replaceAll method to replace newlines

    Mar 24, 2012 · java, regular expression, need to escape backslash in regex "There are two interpretations of escape sequences going on: first by the Java compiler, and then by the …

  9. 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 …

  10. 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".