Skip to content

Instantly share code, notes, and snippets.

@pavi2410
Last active April 12, 2021 07:06
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save pavi2410/d7a6b038ff7d1386ea9dbf3bb5aa6b48 to your computer and use it in GitHub Desktop.
Save pavi2410/d7a6b038ff7d1386ea9dbf3bb5aa6b48 to your computer and use it in GitHub Desktop.

http://play.inginf.units.it/#/level/1

\d+


http://play.inginf.units.it/#/level/2

(\w+)(\:\w+){5} (\w+:){5}\w+


http://play.inginf.units.it/#/level/3

ftp://ftp\d?\d?\.?\w?\w?\.FreeBSD\.org/pub/FreeBSD/ ftp:\S+


http://play.inginf.units.it/#/level/4

\$.+?\$


http://play.inginf.units.it/#/level/5

\d+(\.\d+)+ (\d+\.){3}\d+


http://play.inginf.units.it/#/level/6

href=(['"]).+?\1


http://play.inginf.units.it/#/level/7

http://[\S]+(?:(?=\s|\.|\>)) (Not Working) http://[^ >]+[\w/]


http://play.inginf.units.it/#/level/8

<h(\d)>?.+</h\1>


http://play.inginf.units.it/#/level/9

\(?\d{3}\)?.\d{3}.\d{4} \(?\d+\)?[ -./]\d+[-.]\d+


http://play.inginf.units.it/#/level/10

\w+\,\s.+?\w+ (Not Working) (?<=[{ ])\w+(-\w+)?,( [A-Z]\w*(({.+?}|')\w+)?)+


http://play.inginf.units.it/#/level/11

(?<=<h(\d)>).+?(?=</h\1>) (Not Working) (?<=<h(\d).*?>).+(?=</h\1>)


http://play.inginf.units.it/#/level/12

(?<=\d+\.\s)\w+\,\s[\.\w]+(?=[\,\:]) (?<=\. )\w+, (.\.)+

@Horsetoast
Copy link

Hi, #7 and #10 fail for me. Were the exercise problems updated since you posted the solutions?

@Podoima
Copy link

Podoima commented Mar 31, 2019

Hi, #7 and #10 fail for me. Were the exercise problems updated since you posted the solutions?

Task 7
http://[^( |>)]+(\w|/)

Task 10
(?<=({|\s))(\w*|\w*-\w*),(\s[A-Z]\w*({.+?}[a-z]+)?('[a-zA-Z]+)?){1,}

@mikeforbes5
Copy link

mikeforbes5 commented Jun 3, 2019

Task #11
(?<=<[h\d\w].+>).+(?=</h\d>)

@peterzhang41
Copy link

Task 10
(?<=({|\s))(\w*|\w*-\w*),(\s[A-Z]\w*({.+?}[a-z]+)?('[a-zA-Z]+)?){1,}

Impressive

@peterzhang41
Copy link

peterzhang41 commented Jul 23, 2019

My answer of Task 10:
(?<={|(\sand\s))[A-Z][\w-]+,(\s[A-Z][\w{\'"}])(?=\1|})

@Boumi88
Copy link

Boumi88 commented Oct 13, 2019

Lvl 3: ftp:[^\s]+

@pavi2410
Copy link
Author

pavi2410 commented Nov 2, 2019

Thanks, @Boumi88! I updated Level 3

@pavi2410
Copy link
Author

pavi2410 commented Nov 2, 2019

Thanks, @Podoima! I updated Level 7

@pavi2410
Copy link
Author

pavi2410 commented Nov 2, 2019

Thanks again @Podoima! I updated Level 10

@hthrhthr12
Copy link

hthrhthr12 commented Dec 29, 2019

My solution, the i-th row is the solution to the i-th problem :
\d+

\w+:\w+:\w+:\w+:\w+:\w+

ftp:[^\s]+

[$][^$]+[$]

\d+[.]\d+[.]\d+[.]\d+

href=["'][^\s]+["']

http://\S+(/|\w)

<h\d.+

(\d+[/.-]\d+[/.-]\d+)|([(]\d+[)]\s\d+-\d+)

((?<=and\s)|(?<={))+?[\w-']+,.+?((?=\sand)+?|[}]nter|(?=})+?)

(?<=<h.+?>).+(?=</h\d>)

(?<=\d+.\s)\w+,\s\w.(\w.)?(\w.)?(?=[,:])

@mindgitrwx
Copy link

Shortest solution of level 3 is f.+D/

@Kilian-Hinterhoelzl
Copy link

I found a shorter solution for Level 8:
<h\d.+

@lucaskronlachner
Copy link

lucaskronlachner commented Mar 12, 2021

I got a Solution for Level 10(Without Positive "Lookbefore"'s):
([A-Z]\w+-)?[A-Z]\w+(,\s)A-Z?('Ona)?(\sA-Z?)?
PS: because in Safari Lookbefores don't work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment