The Baeldung logo
  • The Baeldung Logo
  • Start Here
  • Courses ▼▲
    • REST with Spring

      The canonical reference for building a production grade API with Spring

    • Learn Spring Security ▼▲

      THE unique Spring Security education if you’re working with Java today

      • Learn Spring Security Core

        Focus on the Core of Spring Security 5

      • Learn Spring Security OAuth

        Focus on the new OAuth2 stack in Spring Security 5

    • Learn Spring

      From no experience to actually building stuff​

    • Learn Spring Data JPA

      The full guide to persistence with Spring Data JPA

  • Guides ▼▲
    • Persistence

      The Persistence with Spring guides

    • REST

      The guides on building REST APIs with Spring

    • Security

      The Spring Security guides

  • About ▼▲
    • Full Archive

      The high level overview of all the articles on the site.

    • Baeldung Ebooks

      Discover all of our eBooks

    • About Baeldung

      About Baeldung.

Java » Regex

Java is the popular programming language that originated in 1995. Today, the Java ecosystem includes a very large number of specifications, libraries, frameworks, tools, as well as a thriving community. Take a dive through our collection of Java tutorials that cover a wide array of Java-related topics.

  • Core Java (258)
  • Java Streams (113)
  • Java IO (105)
  • Java List (91)
  • Java Map (78)
  • Java Dates (59)
  • Exception (59)
  • x Regex (48)
  • Apache Commons (45)
  • Math (42)
  • Java 8 (41)
  • Pattern (38)
  • Java Set (32)
  • Java NIO (27)
  • Java 9 (25)
  • Java Characters (22)
  • Reflection (22)
  • Java Interfaces (20)
  • Sorting (19)
  • Java Search (18)
  • Java Null (17)
  • Java Constructor (17)

>> Creating Stream of Regex Matches

>> Check if Letter Is Emoji With Java

>> Get the Indexes of Regex Pattern Matches in Java

>> Extract Text Between Square Brackets

>> Split a String Into Digit and Non-Digit Substrings

>> Regular Expression: \z vs \Z Anchors in Java

>> Remove Punctuation From a String in Java

>> Print “” Quotes Around a String in Java

>> Getting the Text That Follows After the Regex Match in Java

>> Find the First Embedded Occurrence of an Integer in a Java String

>> Guide to Splitting a String by Whitespace in Java

>> Capitalize the First Letter of a String in Java

>> Find Files That Match Wildcard Strings in Java

>> Creating a Java Array from Regular Expression Matches

>> Check if a String Ends with a Certain Pattern in Java

>> Compare Strings While Ignoring Whitespace in Java

>> Ignoring Commas in Quotes When Splitting a Comma-separated String

>> Remove HTML Tags Using Java

>> Check if the First Letter of a String Is Uppercase

>> Splitting a Java String by Multiple Delimiters

>> Remove Beginning and Ending Double Quotes from a String

>> Email Validation in Java

>> Convert a String to Camel Case

>> Converting Camel Case and Title Case to Words in Java

>> Lookahead and Lookbehind in Java Regex

>> Non-Capturing Regex Groups in Java

>> Understanding the Pattern.quote Method

>> Find All Numbers in a String in Java

>> Split a String in Java and Keep the Delimiters

>> Split Java String by Newline

>> How to Count the Number of Matches for a Regex?

>> Validate Phone Numbers With Java Regex

>> Regular Expressions \s and \s+ in Java

>> L-Trim and R-Trim Alternatives in Java

>> How to Use Regular Expressions to Replace Tokens in Strings in Java

>> Case-Insensitive String Matching in Java

>> Difference Between Java Matcher find() and matches()

>> Get Substring from String in Java

>> Pre-compile Regex Patterns Into Pattern Objects

>> Check if Two Strings Are Anagrams in Java

>> Removing Stopwords from a String in Java

>> Remove Emojis from a Java String

>> Check if a String Contains All the Letters of the Alphabet With Java

>> Java Check a String for Lowercase/Uppercase Letter, Special Character and Digit

>> An Overview of Regular Expressions Performance in Java

>> Check If a String Is Numeric in Java

>> How to Remove the Last Character of a String?

>> A Guide To Java Regular Expressions API

  • ↑ Back to Top
res – REST with Spring (eBook) (cat=Java)
opt-in
Building a REST API with Spring 5?
Download the E-book
The Baeldung logo

Courses

  • All Courses
  • All Bulk Courses
  • All Bulk Team Courses
  • The Courses Platform

Series

  • Java “Back to Basics” Tutorial
  • Jackson JSON Tutorial
  • Apache HttpClient Tutorial
  • REST with Spring Tutorial
  • Spring Persistence Tutorial
  • Security with Spring
  • Spring Reactive Tutorials

About

  • About Baeldung
  • The Full Archive
  • Editors
  • Jobs
  • Our Partners
  • Partner with Baeldung
  • Terms of Service
  • Privacy Policy
  • Company Info
  • Contact
The Baeldung Logo