write up for Training: Regex (Training, Regex)
# visit https://www.wechall.net/challenge/training/regex/index.php
# Regex Training Challenge (Level 1)
# submit the regular expression the matches an empty string, and only an empty string
`
/^$/
`
# Regex Training Challenge (Level 2)
# Your next task is to submit a regular expression that matches only the string 'wechall' without quotes
`
/^wechall$/
`
# Regex Training Challenge (Level 3)
# Your pattern shall match all images with the name wechall.ext or wechall4.ext and a valid image extension
# ?: will get non capturing group
`
/^wechall4?\.(?:gif|tiff|png|jpg|bmp)$/
`
# Regex Training Challenge (Level 4)
# capture the filename, without extension
`
/^(wechall4?)\.(?:gif|tiff|png|jpg|bmp)$/
`
# you will pass the challenge