IFSC 3300
Regular Expression Study Exercises
1. Give JS code illustrating the use of the construct
[abc]
and provide the result it outputs with a clear explanation.
2. Give JS code illustrating the use of the construct
[0-9]
and provide the result it outputs with a clear explanation.
3. Give JS code illustrating the use of the construct
(x|y)
and provide the result it outputs with a clear explanation.
4. Give JS code illustrating the use of the construct
n+
and provide the result it outputs with a clear explanation.
5. Give JS code illustrating the use of the construct
n*
and provide the result it outputs with a clear explanation.
6. Give JS code illustrating the use of the construct
n?
and provide the result it outputs with a clear explanation.
7. Give JS code illustrating the use of the construct
n{5}
and provide the result it outputs with a clear explanation.