grel general expression character classes

* metacharacters
* character escapes \
* anchors \A\Z or ^$
* character classes [][^]
* quantifiers *?+{min,max}
* grouping ()
* substitutions $1 or \1

4.67
6
Abijah 85 points

                                    . any character (almost*) 
\ escape character
| or
\A or ^ anchor: start of string
\Z or $ anchor: end of string
[] list or range to be matched
[^] negative list or range (NOT these characters)

4.67 (6 Votes)
0
3
1

                                    \d any digit
\D any non-digit
\w any word character [a-zA-Z0-9_]
\W any non-word char. [^a-zA-Z0-9_]
\s any whitespace char.
\S any non-whitespace char.
\t tab
\n newline
\r carriage return

3 (1 Votes)
0
3.72
7

                                    \p{L} - letter
\p{P} - punctuation
\p{InBasicLatin} - in basic Latin Unicode block
\p{InArabic} - in Arabic Unicode block

3.72 (18 Votes)
0
Are there any code examples left?
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source