- 
    Bug 
- 
    Resolution: Fixed
- 
     P4 P4
- 
    8, 10, 11
- 
        b08
                    FULL PRODUCT VERSION :
A DESCRIPTION OF THE PROBLEM :
Using the regex "[ ]" works, but using "(?x)[ ]" does not. The whitespace is ignored and the result is an error. There's a stackoverflow post about it here: https://stackoverflow.com/questions/49264034/
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Whitespace should be ignored when using the x flag (COMMENTS) but not when it's in a character class
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
Escaping the space or moving the inline modifier to after the character class works:
x flag with "\\ " or "[\\ ]"
Other option "[ ](?x)
            
A DESCRIPTION OF THE PROBLEM :
Using the regex "[ ]" works, but using "(?x)[ ]" does not. The whitespace is ignored and the result is an error. There's a stackoverflow post about it here: https://stackoverflow.com/questions/49264034/
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Whitespace should be ignored when using the x flag (COMMENTS) but not when it's in a character class
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
Escaping the space or moving the inline modifier to after the character class works:
x flag with "\\ " or "[\\ ]"
Other option "[ ](?x)
- csr for
- 
                    JDK-8265487 Add doc describing how (?x) ignores spaces in character classes -           
- Closed
 
-         
 
        