The document discusses different types of special characters in strings, including whitespace characters like tabs and newlines, characters from other languages represented by escape codes, and special characters in Java like quotes and backslashes. It also provides an example of a task to check if a string is a valid Canadian postal code and notes that the code for this was presented in a previous lecture.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
53 views4 pages
04 RegEx
The document discusses different types of special characters in strings, including whitespace characters like tabs and newlines, characters from other languages represented by escape codes, and special characters in Java like quotes and backslashes. It also provides an example of a task to check if a string is a valid Canadian postal code and notes that the code for this was presented in a previous lecture.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4
Steven Castellucci
EECS1021 W16 (Steven C.) 2
Whitespace characters ◦ \t for a tab ◦ \n for a newline Special characters not on the keyboard (hello) ◦ \u4f60\u597d (Chinese, 你好) ◦ \u0633\u0644\u0627\u0645 (Farsi, )ﺳﻼﻡ ◦ \u0393\u03B5\u03B9\u03AC \u03C3\u03BF\u03C5 (Greek, Γειά σου) Special meaning in Java ◦ \" for a quote ◦ \\ for a backslash (very important for Reg. Ex.)
EECS1021 W16 (Steven C.) 3
Task: ◦ Output whether or not a String is a valid postal code ◦ E.g., “M3J 1P3” returns true Code: ◦ (Presented in lecture)