About 216,000 results
Open links in new tab
  1. java - How to extract a substring using regex - Stack Overflow

    Searches a String for substrings delimited by a start and end tag, returning all matching substrings in an array. For the example in question to get all instances of the matching substring. String[] …

  2. Pattern/Matcher group () to obtain substring in Java?

    I'd like to match a pattern in a Java string and then extract the portion matched using a regex (like Perl's $& operator). This is my source string "s": …

  3. String Pattern Matching In Java - Stack Overflow

    Oct 29, 2011 · If you want to check if some pattern is present in a string, append and prepend the pattern with '.*'. The result will accept strings that contain the pattern. Example: Suppose you …

  4. Java String substring() Method - GeeksforGeeks

    Apr 11, 2025 · In Java, the substring() method of the String class returns a substring from the given string. This method is most useful when you deal with text manipulation, parsing, or data …

  5. Java String substring() Method - W3Schools

    The substring() method returns a substring from the string. If the end argument is not specified then the substring will end at the end of the string.

  6. Get Substring from String in Java - Baeldung

    Jul 21, 2024 · In this quick article, we found out various ways to extract a substring from a String in Java. We also offer other tutorials for String manipulations in Java.

  7. How to extract a substring using regex - W3docs

    To extract a substring from a string using a regular expression in Java, you can use the following steps: Compile the regular expression pattern using the compile() method of the Pattern class: …

  8. How to extract a substring from a given string pattern in Java

    To extract a substring from a given string pattern in Java using regular expressions, you can use the java.util.regex package, which provides the Pattern and Matcher classes for working with …

  9. Extract a Substring Between Two Characters in a String in Java

    Feb 9, 2024 · In Java, the extraction of the substring between the two characters in a string can be implemented with the substring method, and string is a pre-defined method in the class of …

  10. Java: Find Substring in String - Java Guides

    Finding a substring within a string is a common task in Java. This guide will cover different ways to find a substring, including using the indexOf method, the contains method, and regular …

Refresh