Тёмный

How to use Regular Expressions with Excel VBA(Part 2) 

Excel Macro Mastery
Подписаться 85 тыс.
Просмотров 19 тыс.
50% 1

Опубликовано:

 

11 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 59   
@KhalilYasser
@KhalilYasser 4 года назад
Thank you very much for awesome tutorials Paul
@Excelmacromastery
@Excelmacromastery 4 года назад
You're welcome.
@Excelmacromastery
@Excelmacromastery 4 года назад
This is my second video on using regular expressions with VBA. I hope you will find it useful. Please add any questions or comments below😀😀.
@Kurt1968
@Kurt1968 4 года назад
Great videos!! When will the 3rd in the RegEx series be released?
@tomharrington1453
@tomharrington1453 3 года назад
Great video. More Regular Expression videos, please!
@robinhahn6987
@robinhahn6987 Год назад
This series on RegExp has been a game-changer for my little Excel-based bank-account tracking and budget app. And to think I only discovered this now. I still need to get a better grasp of the finer points of using Regular Expressions, but these videos - as well as the one on late vs early binding... what a goldmine there! - has truly transformed managing incoming data to the worksheets. I'm retired (from nursing) and so on a fixed income, but even so, am going to save up for your course (I live in Australia, so everything is more expensive here). There are apps to be written and VBA actually offers really cool solutions: many people already have some version of MS Office, so nothing to install and with late binding, nothing to activate in the VBE.
@robinhahn6987
@robinhahn6987 Год назад
BTW, wish you were on Discord - be great to chat with other VBA developers that use your tools.
@Excelmacromastery
@Excelmacromastery Год назад
Thanks Robin. Glad you found the videos helpful.
@stephenkaras1523
@stephenkaras1523 4 года назад
Can’t wait for the next video. Regex is one of the most powerful objects out there
@terrycline8689
@terrycline8689 4 года назад
You're such a tease! Quantifiers! that was going to be my first question - can we combine patterns into one statement....now I gotta wait...lol! thanks again, great stuff!
@ajayjoseph7418
@ajayjoseph7418 4 года назад
Thanks for the video. I am looking forward to see part 3 of this series. Thanks again
@htchd0211
@htchd0211 3 года назад
Looking forwards Part3
@houstonvanhoy7767
@houstonvanhoy7767 3 года назад
Nice, clear explanations, Sir Paul. Thanks. ✔ 2:27. I take it that "regEx.Global = False" works like the "distinct" keyword in a SQL SELECT clause. 10:47. "Square parentheses" - called "square brackets" over here in the U.S.A. Two great peoples divided by a shared language. We are still waiting for "Quantifiers" to appear. Thanks again.
@MamToCos
@MamToCos Год назад
It is awesome! I am grateful for your effort. I have few more topics for you to explain: lookaround, grouping, replacing of group. I hope to see it soon. Greetings.
@sandeepkothari5000
@sandeepkothari5000 4 года назад
Dear Paul, Eagerly awaiting your tutorial on Quantifiers.
@houstonvanhoy2198
@houstonvanhoy2198 2 года назад
Terrific, as always. Thank you, Sir Paul!
@Excelmacromastery
@Excelmacromastery 2 года назад
Thanks Houston.
@dandanakan0
@dandanakan0 2 года назад
Thanks a bunch for sharing the most valuable tricks with us Paul; cannot wait to watch PART-3 though ;)
@terrycline8689
@terrycline8689 4 года назад
Am I correct that there is no Part 3, covering Quantifiers within Regular Expressions? Can't seem to locate it if it exists...thanks Paul, you rock.
@MyFakeBrand
@MyFakeBrand 4 года назад
Great video, Paul. This is better than aspirin! I’ve been needlessly banging my head against the wall with instr, mid, left, etc. for too long. I can tell by the comments part 3 will be a big hit when it comes out.
@Excelmacromastery
@Excelmacromastery 4 года назад
Great to hear!
@hemant0088
@hemant0088 4 года назад
Much useful.We are waiting for 3rd part where quantifies will cover. Also, I have one query if we need to remove all special characters then what will be our pattern.
@17corteznumber
@17corteznumber 3 года назад
Great job Sir, very informational, beautifully explained!
@amennkonou7161
@amennkonou7161 4 года назад
Thanks very very much Sir
@metinguler
@metinguler 4 года назад
Perfect, thank you.
@rrrprogram8667
@rrrprogram8667 4 года назад
Awesoem.... We would love to see this as an article in ur website
@iincitr
@iincitr 4 года назад
This video is awesome. Thank you Paul.
@edgarbarnett8348
@edgarbarnett8348 4 года назад
Amazing content! very helpful and your explanation is easy to follow, keep up the great work!
@SolidSnake59
@SolidSnake59 4 года назад
It's getting better and better :)
@Excelmacromastery
@Excelmacromastery 4 года назад
Thanks
@michaelturner9673
@michaelturner9673 4 года назад
Great videos. Very clearly explained and excellent examples.
@ilotvin
@ilotvin 4 года назад
Great tutorial, very helpful. Does part 3 out yet?
@Excelmacromastery
@Excelmacromastery 4 года назад
Not yet.
@richrobins5711
@richrobins5711 4 года назад
Learning so much!! Thank you!! :D
@MrMallesh1
@MrMallesh1 3 года назад
Hi Paul, Looking for one more video on Regular expression, Covering quantifiers.
@Excelmacromastery
@Excelmacromastery 3 года назад
I haven't made it yet.
@yeankub
@yeankub 4 года назад
Thanks you very much if do that all in a Pattern, can I use "^Report.*[A-E]2019.*csv$" ?
@DataGo888
@DataGo888 2 года назад
12 : 11.How can I get the picture at the end of the video, about "VBA Workbooks, Worksheets and Ranges"? Thanks a million.
@lugraykell
@lugraykell 4 года назад
You're wrong about the dot (period). It matches all characters except the newline. If you want to match a dot, then you need to escape it. To escape the dot, just precede it with a backslash, such as (without quotes) "\." In your example of matching csv file extensions, your regular expression will match (without quotes) "9csv", "ucsv", or even " csv" (space followed by csv) among others. So, if you want to match csv file extensions, your regular expression should be (without quotes): "\.csv$".
@Excelmacromastery
@Excelmacromastery 4 года назад
I just forgot the backslash😀
@jeanphilippebagel6414
@jeanphilippebagel6414 3 года назад
I've always struggled with those. Am looking for a pattern of open square bracket (any letter or word or character or number) then close square bracket, like [Example] or [this 1]. What would the pattern be?
@HectorMendozas
@HectorMendozas Год назад
hello, the third class of regular expressions < *+?{n} - Quantifiers > has already been published?
@keagenkuhn3468
@keagenkuhn3468 2 года назад
Is there a way to use it to sort a list of codes consisting of [A-Z]+, \d+ , [A-Z] for example FE2A or SCD21B alphabetically for the first [A-z]+, and for those with the same [A-Z]+ to be sorted from lowest to highest number, then for codes that have the same [A-Z]+ and \d+ to be sorted alphabetically by the last [A-Z]
@gringolazaro3303
@gringolazaro3303 3 года назад
Hi Paul, thanks for part 2, is part 3 stills coming?
@sandeepkothari5000
@sandeepkothari5000 2 года назад
Dear Paul, the 2 videos on RegExp are wonderful. have you released the 3rd one, with quantifiers? i could not find in your channel.Am I missing it?
@Excelmacromastery
@Excelmacromastery 2 года назад
I haven't released it yet and haven't any plan to at this time.
@sandeepkothari5000
@sandeepkothari5000 2 года назад
@@Excelmacromastery no problem.
@johnwayne8059
@johnwayne8059 Год назад
Hey Paul!✌️ Hope you're doing fine! Thanks for your work! I'm searching for the 3rd part of RegEx in VBA, where can I find it or doesn't it even exist?😅 If it's not existing yet, might be it's a good theme for a next video!?!😇
@Teruroom
@Teruroom 4 года назад
thanks for your explanation :-)
@ryaneickmeyer6191
@ryaneickmeyer6191 4 года назад
Hello, i really like your videos - At the end of this video you say the next video will cover 'qualifiers' for regular expressions. What is the title of the video that you use 'qualifiers' for regular expressions?
@Excelmacromastery
@Excelmacromastery 4 года назад
Hi Ryan. I haven't got around to making that one yet.
@jtuck9876
@jtuck9876 3 года назад
Hello, I created an excel sheet identical to yours at 9:00 and input the code exactly as you had, but am getting a Run-time error '424' Object required error. Any idea what I might be doing wrong? It appears from testing that the issue arises from using shFilenames.
@Excelmacromastery
@Excelmacromastery 3 года назад
The sheet you are referring to should have the "code name" shFilenames. Alternativelty you can use ThisWorkbook.Worksheets("shFilenames")
@wongpeter4058
@wongpeter4058 4 года назад
Nice. But I am waiting the Quantifiers video, followed by Regex part 2.
@alterchannel2501
@alterchannel2501 Год назад
Very usefull but where is part 3??
@thoriumt-phoenix6084
@thoriumt-phoenix6084 4 года назад
Just a remark Paul, the dot in .csv$ regexp pattern should be escaped by \ in order to match .csv expression. Nevertheless, your videos are awesome ;)
@graphguy
@graphguy 2 года назад
2022; this doesn't work, but probably my error. Comes back "Compile error: Variable not defined" - referring to shFilenames.Range("B1:B7").ClearContents Sub RE_Example() 'Clear any existing results shFilenames.Range("B1:B7").ClearContents ' Get the range of filenames Dim rg As Range Set rg = shFilenames.Range("A1:A7") ' create the regular expression Dim i As Long, regex As New RegExp regex.Global = True regex.Pattern = "" ' Read through the filenames For i = 1 To rg.Rows.Count ' Use Test to see if the pattern exists rg.Cells(i, 2).Value regex.Test(rg.Cells(i, 1).Value) Next i End Sub
@rejdrouin
@rejdrouin 4 года назад
Ah ! I have used to use lots of regulars expressions in Unix, Linux and all but I thought that wasn't possible in Excel VBA. Silly me.
@tughanozsezer9332
@tughanozsezer9332 4 года назад
.
Далее
How to make your Excel VBA code run 1000 times faster
16:55
How to use ADO and VBA to Read from Worksheets
12:15
Просмотров 76 тыс.
Excel VBA: The Little-known secrets of ByVal and ByRef
13:00
How to Use Arrays Instead of Ranges in Excel VBA
10:20
Просмотров 199 тыс.
Excel Just Got NEW REGEX Functions You Need to Try!
5:55
How to Use Class Interfaces in Excel VBA
20:16
Просмотров 80 тыс.
5 Killer Excel VBA Tips Everyone Should Know
12:55
Просмотров 109 тыс.