02 - Regular Expressions ( [^] + * \w \d \s \b )

preview_player
Показать описание
| VBScript (.vbs) Tutorial
Before we apply regular expressions let's learn how to use them.
This video goes over the items:

Character Classes Matching:
[n-s] = [nopqrs]
[4-7] = [4567]
[^$%#Uy7] = matches everything but these characters after the ^
\d = [0-9]
\D = [^0-9]
\w = [a-zA-Z_0-9]
\W = [^a-zA-Z_0-9]
\s = [ \t\r\n\v\f]
\S = [^ \t\r\n\v\f]

Position Matching:
\b = matches word boundary
\B = matches non-word boundary

Repetition Matching:
? = {0,1}
* = {0, ...}
+ = {1, ...}
Рекомендации по теме
Комментарии
Автор

Thanks for the word boundary explanation. You did it concisely, very clear.

robwheelut
Автор

Thank for the boundary explanation now i understands this is simple

igu
Автор

Thanks for your reply. I really like your way of explanation very much. I think you are very knowledgeable person, that's why you are explaining in better way. So many people are just copy pasting definitions and examples.from different websites but your's examples are very different and understandable to everyone. I appreciate for making videos like this. Good job.

prasannakumar
Автор

Wonderful and simple explanation. Thank you much!

conrat
Автор

Thanks a lot for such clear cut explanation.

learningbegins
Автор

This is a very helpful video. Thank you!

troyswanson
Автор

Very helpful and clear video. Just one thing though, in the text below the video the \W and \S equivalents are missing the caret(^)

charliemaguire
Автор

Came across your videos. I love the step by step explanations. By any chance do you teach hands on or live classes? I would love to be part of your class or your team of students. I am a Texan as well!

joelkhan
Автор

what is the shorthand regular expression for - [a-zA-Z0-9] and [a-zA-Z] (no underscore)!!!

Manojshankar
Автор

Sir, could you please clarify me a doubt if don't mind and if time permits?
I need to match 4 digit words like 1234 (23456) with or without brackets for that I have written objRe.pattern="\(?\d{4}\)?" it is working as expected but I need to apply boundary for this as I dont want it matches with 1112345 333(23456) . For this I have written num.pattern="\b\(?\d{4}\)?\b" but it is not working as I expected. it matching even match is part of some other string.

prasannakumar
Автор

How to find "Error or error or Error Handling" words from a large notepad?

suhasmahamuni