When using "\t"
, the escape sequence \t
is replaced by Java with the character U+0009. When using "\\t"
, the escape sequence \\
in \\t
is replaced by Java with \
, resulting in \t
that is then interpreted by the regular expression parser as the character U+0009.
So both notations will be interpreted correctly. It’s just the question when it is replaced with the corresponding character.
Related Posts:
- What does regular expression \\s*,\\s* do?
- Split string into array of character strings
- Using or ‘|’ in regex [duplicate]
- How to split a string in Java
- Java split string to array [duplicate]
- How to match “any character” in regular expression?
- How to split a String by space
- How to match “any character” in regular expression?
- How to split a string in Java
- Java split string to array
- Range of valid character for a base 64 encoding
- List of all special characters that need to be escaped in a regex
- Regular Expressions on Punctuation
- How to extract a substring using regex
- Whitespace Matching Regex – Java
- How to represent a fix number of repeats in regular expression?
- Using regex to match any character except =
- How to use regex in String.contains() method in Java
- Whitespace Matching Regex – Java
- Difference between regex [A-z] and [a-zA-Z]
- Regex pattern including all special characters
- Use String.split() with multiple delimiters
- Java regex email
- Java 8 Iterable.forEach() vs foreach loop
- How to round a number to n decimal places in Java
- Error unable to access jarfile C:\Jar
- In laymans terms, what does ‘static’ mean in Java? [duplicate]
- Sort an array in Java
- Java String Split by “|”
- Could not reserve enough space for object heap
- java.lang.ClassNotFoundException: com.mysql.jdbc.Driver in Eclipse
- “Char cannot be dereferenced” error
- Is there a stopwatch in Java?
- com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
- Print ArrayList
- Unsupported major.minor version 52.0 [duplicate]
- What is a StringIndexOutOfBoundsException? How can I fix it?
- Non-static variable cannot be referenced from a static context
- How to get an enum value from a string value in Java
- Round a double to 2 decimal places [duplicate]
- Java integer list
- How can I properly compare two Integers in Java?
- element not interactable exception in selenium web automation
- How do I save a String to a text file using Java?
- method in class cannot be applied to given types
- HTTP Status 405 – Request method ‘POST’ not supported (Spring MVC)
- “NoClassDefFoundError: Could not initialize class” error
- Implements vs extends: When to use? What’s the difference?
- Ubuntu: OpenJDK 8 – Unable to locate package
- The @ symbol in java
- How to check whether a int is not null or empty?
- How to parse JSON in Java
- Declaring an unsigned int in Java
- Converting Hexadecimal String to Decimal Integer
- LocalDate to java.util.Date and vice versa simplest conversion?
- What is a Question Mark “?” and Colon “:” Operator Used for?
- How to remove single character from a String
- org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when ‘hibernate.dialect’ not set
- Is there a concurrent List in Java’s JDK?
- org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when ‘hibernate.dialect’ not set
- How to check if my string is equal to null?
- what is Ljava.lang.String;@
- “Could not find Java SE Runtime Environment.” after installing Java
- How can I create an utility class?
- difference between ‘static int’ and ‘int’ in java
- How to use PrintWriter and File classes in Java?
- Error message “unreported exception java.io.IOException; must be caught or declared to be thrown”
- cannot make a static reference to the non-static field
- Double cannot be dereferenced?
- Encrypt Password in Configuration Files?
- Java Reflection – Object is not an instance of declaring class
- What does “AL lib: alc_cleanup: 1 device not closed” mean?
- Java Enum return Int
- Java, Simplified check if int array contains int
- Converting a string to an integer on Android
- Error: Generic Array Creation
- How to center the text in a JLabel?
- What is the use of a private static variable in Java?
- How to import a jar in Eclipse
- What is method hiding in Java? Even the JavaDoc explanation is confusing
- Error: class X is public should be declared in a file named X.java
- When should you use multithreading? And would multi threading be beneficial if the different threads execute mutually independent tasks?
- How to Convert Int to Unsigned Byte and Back
- Suggestions needed: Effective Java to C source code converter
- Downloading a file from spring controllers
- Java Error Exception in thread “AWT-EventQueue-0” java.lang.StackOverflowError
- Write a program that reads an unspecified number of integers, determines pos, neg, total, average
- Parsing JSON string in Java
- java attempting to assign weaker access privilege error
- Getting a “no interface expected here” when I try to subclass ServiceConnection [duplicate]
- How to determine day of week by passing specific date?
- Python-like list comprehension in Java
- Java Iterator on Doubly-linked-list
- Why “no projects found to import”?
- Java Swing setting JPanel Size
- how to use “tab space” while writing in text file
- Change Name of Import in Java, or import two classes with the same name
- set background color: Android
- Class JavaLaunchHelper is implemented in two places
- No Main class found in NetBeans