Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 907403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T16:33:00+00:00 2026-05-15T16:33:00+00:00

Which regular expression engine does Java uses? In a tool like RegexBuddy if I

  • 0

Which regular expression engine does Java uses?

In a tool like RegexBuddy if I use

[a-z&&[^bc]]

that expression in Java is good but in RegexBuddy it has not been understood.

In fact it reports:

Match a single character present in
the list below [a-z&&[^bc]

  • A character in the range between a and z : a-z
  • One of the characters &[^bc : &&[^bc
  • Match the character ] literally : ]

but i want to match a character between a and z intersected with a character that is not b or c

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T16:33:01+00:00Added an answer on May 15, 2026 at 4:33 pm

    Like most regex flavors, java.util.regex.Pattern has its own specific features with syntax that may not be fully compatible with others; this includes character class union, intersection and subtraction:

    • [a-d[m-p]] : a through d, or m through p: [a-dm-p] (union)
    • [a-z&&[def]] : d, e, or f (intersection)
    • [a-z&&[^bc]] : a through z, except for b and c: [ad-z] (subtraction)

    The most important “caveat” of Java regex is that matches attempts to match a pattern against the whole string. This is atypical of most engines, and can be a source of confusion at times.

    See also

    • regular-expressions.info/Flavor Comparison and Java Flavor Notes

    On character class subtraction

    Subtraction allows you to define for example “all consonants” in Java as [a-z&&[^aeiou]].

    This syntax is specific to Java. In XML Schema, .NET, JGSoft and RegexBuddy, it’s [a-z-[aeiou]]. Other flavors may not support this feature at all.

    References

    • regular-expressions.info/Character Classes in XML Regular Expressions
    • MSDN – Regular Expression Character Classes – Subtraction

    Related questions

    • What is the point behind character class intersections in Java’s Regex?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 504k
  • Answers 504k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Don't download the same resources every time the orientation changes.… May 16, 2026 at 3:02 pm
  • Editorial Team
    Editorial Team added an answer Databases won't conflict with each other. You can think of… May 16, 2026 at 3:02 pm
  • Editorial Team
    Editorial Team added an answer Pragmas are compiler dependent stuff. This one looks specific to… May 16, 2026 at 3:02 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I've written a content management system that uses a server-side regular expression to escape
Is it possible to write code which generates a regular expression or XPath that
I have the following regular expression, which I think should match any character that
I have a string which I want to use in a regular expression it
I have a regular expression to match usernames (which functions in PHP using preg_match
can somebody point me to a good regular expression resource (for php if it
Is there an existing robust Java library which implements a fairly substantial subset of
i am using this regular expression and it works fine for the two dots
I have a collection of files in a directory which I would like to
I have the following regex which suppose to match email addresses: [a-z0-9!#$%&'*+\\-/=?^_`{|}~][a-z0-9!#$%&'*+\\-/=?^_`{|}~.]{0,63}@[a-z0-9][a-z0-9\\-]*[a-z0-9](\\.[a-z0-9][a-z0-9\\-]*[a-z0-9])+$. I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.