:Santa: Advent Challenge #2 (Everyone welcome to join the event!)

Welcome to the 2020 Advent Challenge #2!

All users are welcome! :innocent: (You can still join. You don’t need to participate in Challenge #1)

Earn Stars :star: to increase your chances to win a prize :gift:
More info here.

Santa :santa: needs your help! Santa is currently stuck in Bangkok, Thailand :thailand:!!!

Santa was so busy working that his reindeer :deer: needed a break from pulling the sleigh. Unfortunately the reindeer have now walked away – but if Santa calls their names they will return!
image

Unfortunately Santa has had a long day and can’t remember their names! :sweat_smile: (Santa is a little embarrassed about it – so please don’t tell anyone :shushing_face:). Lucky Santa has their names saved on the Regex101 website but needs your help with the Regex pattern.

Can you help Santa with his Regex? :blush:

*Please include in your reply which challenge you are solving - “Beginner” or “Advanced

Beginners Advent Challenge #2:

Lucky Santa is prepared and has the reindeer names saved on Regex101.com (BEGINNERS LINK) with the number of snowmen :snowman: they have made at the North pole this year.

To Complete the Beginner’s challenge for Santa:

  • Obtain the names of the reindeer from the Beginner list using Regex.
    • Share your working Regex Pattern in your reply (Screenshot/text)
  • Upload evidence (screenshot/s) that you successfully obtained the results using UiPath.
    • Suggestion: Share a screenshot of your ‘write line’ results
    • Or Upload your XAML in your reply

Need help? A friendly elf :elf: sent me this Regex MEGAPOST link.

Advanced Advent Challenge #2:

Lucky Santa is prepared and has the reindeer names saved on Regex101.com (ADVANCED LINK) with the number of snowmen :snowman: they have made at the North pole this year.

BUT wait there is a problem! Santa’s reindeer list is looking REALLY messy…

  • The elves have been playing with the file and have drawn Christmas images in it.
  • The file also corrupted when an elf threw a snowball at the computer and hit it. Now the file has random characters throughout!

There is some hope though. Santa did tell us about the Pattern within the text. Santa did say that each Reindeer name had a prefix of "Reindeer: “ and there was exactly eight (8) reindeer.

To complete the Advanced Challenge for Santa:

  • Obtain the names of the reindeer from the Advanced list using Regex.
    • Share your working Regex Pattern in your reply (Screenshot/text)
  • Obtain the number of snowman each reindeer has made at the North pole.
    • Share your working Regex Pattern in your reply (Screenshot/text)
  • Combine both results into a single write line activity so it’s easy for Santa to read.
    • Example: “Reindeer1 has made 7 snowmen”
    • Or upload your XAML in your reply.

Deadline:

Submissions must be posted in this thread will be accepted until 2020-12-06T22:59:00Z

Bonus points will be awarded for pop culture references, creative solutions and responses :smiley:

Santa’s next stop is Copenhagen :denmark:

Good luck :four_leaf_clover:
Santa Steve & Jingle-Bell Jensen (@Steven_McKeering & @AndersJensen)

21 Likes

BEGINNER CHALLENGE SOLUTION

Hi Santa , still thinking about the names of reindeer??
image

If yes, the solution for your problem is here :blush::blush::blush::blush::blush:

Mr Robot is appointed for solving this problem :blush::blush::blush::blush::robot::robot::robot::robot:

Mr Robot has helped Santa in retreving the names of reindeer by using the regex pattern

Screenshot of regex pattern
image

Implemented the regex pattern in UiPath and retrived the reindeer names as output

AdevntChallenge_2_Begineer.zip (34.4 KB)

Check the workflow

At last after getting reindeer names santa is very happy and is thanking Mr. Robot

Happy Automation :robot::robot::robot:

Nived N

18 Likes

RegEx : Reindeer: ([a-zA-Z]+)[\s]?-[\s]+([0-9]+)2

Main.xaml (14.9 KB)

15 Likes

Not Long ago……
Santa has had a long day and can’t remember their names!
(Santa is a little embarrassed about it – so please don’t tell anyone ).
Luckily, Master Yoda sensed this

YODA

As the JEDI’s are tied up for the moment .we are sending our bots for your rescue.

Santa: My favorite Bots
R2D2: BLEEP BLOOP BLOOP BLOOP BLEEP …….searching for patterns….BLEEP BLOOP BLEEP
C3P0: Understood R2D2… Here is the Pattern and your reindeer names, Santa.

beginner_1_regex

Santa: I have one more list … can u decode it
RD2D2: BLEEP BLOOP BLOOP BLOOP BLEEP BLEEP BLOOP BLOOP BLOOP BLEEP …….searching for patterns….BLEEP BLOOP BLEEP
C3P0: Understood R2D2… Here is the Pattern and your reindeer list ,Santa.

advanced_1_regex

advanced_1_result

Santa: Thanks C3PO and R2D2. I will resume my journey. Happy Christmas. May the Force be with You

Once Again Bots came to the rescue.

Advent_2.zip (4.4 KB)

18 Likes

Advent Challenge 2 solution with Advanced Option.

Santa :santa: do you really need my Smart Robot help?

Santa: Yes, My Son

Ok Santa, don’t worry

My Smart Robot is here to help you to find their names. Yupppieeeee :heart_eyes: :heart_eyes: :heart_eyes: :heart_eyes: :heart_eyes: :deer: :deer: :deer: :deer: :deer:

Santa: Ohh reallyyyy

bucket

yesss Santa :smiling_face_with_three_hearts: :smiling_face_with_three_hearts: :smiling_face_with_three_hearts: :smiling_face_with_three_hearts:

And My Smart Robot also give you the Number of Snowman each reindeer has made at the North Pole.

Santa: Are you sure my Son?

yes Santa,

Santa: Then Let’s go… wohooooooooo :smiling_face_with_three_hearts: :smiling_face_with_three_hearts: :heart_eyes: :heart_eyes: :heart_eyes:

here is the Screenshot of Regex pattern output of Names and Number of Snow Man.

And below screenshot is the final output in UiPath:

Ok santa. I hope you will be happy. :star_struck: :star_struck: :kissing_heart: :kissing_heart:

Santa: Thank you my Son :kissing_heart: :kissing_heart: :innocent: :innocent:. This beautiful Gift for you my Son. Be happy :wink: :wink: :wink:

Attached is the XAML file workflow.

AdvanceAdventChallenge_2.zip (23.5 KB)

13 Likes

Dear Santa,

I hear you say “How unlucky that this should happen to me! Can’t remember my reindeer names!”

Don’t worry UiPath Team here to help you.

I found your reindeer names even both “Beginners” and “Advanced” ways.

Beginners Advent Challenge #2 Solution
The regular expression that we need to find reindeer names is below;

image

The workflow and the output is below;

image

image

BeginnersAdventChallenge2.Solution.zip (35.8 KB)

Advanced Advent Challenge #2 Solution
The regular expression that we need to find reindeer names and the number of its snowman;

image

The workflow and the output is below;

image

AdvancedAdventChallenge2.Solution.zip (36.1 KB)

I can’t wait for you to visit me this year! I will leave out a snack for you and the reindeer!
Greetings from Turkey. :santa:

13 Likes

Advanced Advent Challenge #1

Hi Santa,

I know you had a hard, long day, go get some rest and when you wake up from your nap you can find all your reindeers’ names.

image

I looked at your list on regex101 and I have to say that elves are real little rascals, but elf-bot will never disappoint you!

image

Here is the pattern that will help you get your reindeers’ names:
Reindeer:\s*(\w+)

And the pattern useful to find for each the number of snowmen they made at the North pole:
Reindeer:\s*\w+\s*-\s*(\d+)

As I am the best elf-bot I combined the patterns so that you can easily read your reindeers’ names and snowmen number they made:
Reindeer:\s*(?:(\w+)(?:\s*-\s*)(\d+))

Eventually, you’ll find above the list I obtained:
image

Wake up well Santa :slight_smile:

Advent_challenge_2.zip (1.1 MB)

10 Likes

Advanced Advent Challenge #2:

Dear Santa,

we’ve heard that you are lost in Bangkok, and you have some memory issues, right?
Well you are in luck, because we already had a similar problem before, and we came to help you!
image

So you need to remember the names of your reindeer? Well last time we forgot something, we discover that using regular expressions might help to find out informations!

image

Oh, so your elves have played with your files and now they are very difficult to read!
Well we also had a similar issue, with a little friend of ours that made a real mess
image

Luckily we learned how to extract the informations from all kind of files, including your!
So relax and wait as we extract the data for you
image




Here’s the regex to retrieve the names of your reindeer
image



Here’s the one to get the snowmen
image

And finally, one to get both the results written!
image
image

Now hurry up and leave, we are waiting for you!!
image

Challenge2.xaml (7.4 KB)

12 Likes

Advanced Advent Challenge #2:

Even though Santa is stuck in Bangok, he is busy in distributing the gifts to the people of Bangok.

In the mean time can we get into the action to help Santa…hmm how do I Solve this…
image

!!! Regex !!!

image

and here comes the solutions to the problem…

Santa asked for the Present

image

Since Santa forgot the name of the Reindeers , I have added the image of the Reindeers too. Here is the my beautiful present(ation) to Santa for this Christmas

Images, Texts and the Slide has been created dynamically in the do while loop.

XAML, Images and the Output: Advent_Regex.zip (715.2 KB)

Adding: Beginners Advent Challenge #2:

oh no…I forgot my reindeer names…

image

Santa needs a Robot’s help …

image

Robot help Santa in finding the Reindeer Names with the below Regex…

Santa’s gift to Robot…

image

XAML: Main.xaml (5.5 KB)

9 Likes

Hi @Santa,

I am new to Regex so pardon my use of grouped regex syntax in the Advanced Advent Challenge #2!

:mage:
Abrakadabra one expression to solve them all

:mage:
:\s(\w*)(\s-\s|-\s)(\d*)

  • :\s everything starts at the colon and a white space

  • Group 1 is (\w*) which gets us the 8 reindeer names after the colon without white spaces

  • Group 2 is (\s-\s|-\s) which we will not be using but this is important because there is a tricky reindeer with hypen after it “Comet-” we say either get matches with a space and “-” and space OR a “-” and space.

  • Group 3 is (\d*) is our final group which gives us the number of snowman per reindeer

A total of 8 matches.

Then I used :unicorn: UiPath :unicorn: to extract the group values.

image

Here is my submission Santa, do read the annotations if you are wondering about anything. Take care until next time!

LogisticsReport.xaml (15.9 KB)

9 Likes

Hi @jeevith appreciate your participation in this, its always 1st time to something and that’s how the journey to becoming an expert starts :slight_smile:

10 Likes

Really interesting solutions, and loving the way everyone makes it super creative!!!
Great stuff guys!!!

Waiting for more!!! :drum: :drum: :drum:

8 Likes

Oh, Dear Santa,

I heard you forgot your reindeers’ names. :pensive: Don’t worry it’s between us. :wink:
image

Please rest well while I’m preparing the list for you. :zzz: :zzz:
image


WAKE UP SANTA!

Here is the names of your reindeers. Quick! Call their name and bring them! :deer::deer::deer:

image

image

Cool, right?

Here the regex I’ve used:
Reindeers name: “(?<=Reindeer: )(?:\w+)”
Snowmen list: “(?:\d+)(?= snow)”
Also both of them: “(?<=Reindeer: )(\w+\W+\d+)(?= snow)”

Do you want to see the elves’ drawings? They’re awesome. Here is the Regex of drawings: “[\W|_]{5,}”

Alright Santa, you’re all set! :santa:t2:

See you in Istanbul, please don’t forget my gift! :gift: :gift:

For Advanced Advent Challenge:
Advanced_AdventChallenge_2.zip (36.3 KB)

9 Likes

You and @Vibhor.Shrivastava really inspiring the youngsters and boost their confidence to the new level. Thanks to you both guyz​:slight_smile::slight_smile::slight_smile:

6 Likes

istockphoto-864433214-612x612

@AndersJensen, here are my solutions:

Beginner Challenge:

Regex Pattern screenshot:
image

Full Page screenshot:

Output screenshot:
image

Workflow file:
UiPath-Advent-Day2-Beginner.xaml (7.7 KB)

Advanced Challenge:

Regex Pattern screenshot:
image

Full page screenshot:

Output screenshot:
image

Workflow file:
UiPath-Advent-Day2-Advanced.xaml

Can’t wait to solve the next challenge! Thanks for this @Vibhor.Shrivastava, @Steven_McKeering, @AndersJensen and others!

Cheers!

By the way, here’s Santa:

7 Likes

Oh I really suck at RegExp, so this was a good exercise.
I see that others has more simpler expressions, but no sneek peeking…
.*Reindeer: {1,}\s?-.(\d*){1,}”

Great fun! Take care all!

image
Reindeer_names.xaml (14.1 KB)

6 Likes

@Markus_Anding, Doesn’t matter you are not an expert… All that matters is trying out… and trials make you perfect :smiley:

Just to tell you guys, once I was horrible in Regex… I was too bad on it and I really didn’t want even to try out…
When someone says regex, i was like “Oh… noooo” :rofl:
so always looked for methods to do without regex
But slowly, i just got used to the concept of regex by trying simple :slight_smile:

Your solution is great man!! Great stuff!!

8 Likes

ADVANCED CHALLENGE
@Steven_McKeering @AndersJensen

Hi everyone, lets solve the advanced challenge for santa :slight_smile: :slight_smile: :slight_smile:

REGEX PATTERN

image

Output of the process
image

Thus at last santa clears his confusion , now he is feeling happy :heart_eyes: :heart_eyes: :heart_eyes: :heart_eyes:

Attaching workflow
AdventChallenge_2_Advanced.zip (35.6 KB)

Happy Automation

Nived N

8 Likes

Man @NIVED_NAMBIAR, this is creative! Appreciate your efforts! :slight_smile:

Well done!

5 Likes