You have no idea how badly I wanted to include the "look what they need to mimic a fraction of our strength"-meme.
Power Query doesn't natively have regex (regular expressions).
But I can make my own.
In this video I recreate the \d{3} regex, or "if you can find three numbers in a row, please grab the first match". I also add a bonus that tells you if the text string is too short or if there was no match.
Lastly I upgrade the function to allow you to grab the last match instead of the first. If you don't write "true" as the second argument, you'll get the first match.
You could definitely add more to the function e.g. let you pick \d{4} instead, or select the second match. I chose not to.
00:00 Intro
00:27 End result teaser
00:48 Upgraded function teaser
01:00 Parameter + helper query
02:43 List from 0 to Number of loops
03:07 List Generate is hard to explain
04:21 List from 0, part 2
04:44 Text Middle
05:32 is number
06:45 Check length of text
07:07 Output
07:27 Testing the function
08:29 Function 2, optionally select the last match
13:12 Adding an optional argument
15:27 type any, not type logical
Смотрите видео 65 - \d{3} regex in Power Query онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь WesleySon 04 Апрель 2024, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 877 раз и оно понравилось 10 людям.