跳到主要内容

Crypto - 080

备注

created by || rpj7

⏲️ Release Date // 2024-01-05

💀 Solvers // 10

🧩 Type // crypto

题目给出的是这个数据

(?![a-z])([VHM]{3})(?!\w)(?P<Q>[\{])R(?![\d])(e)g\3x(\_{1})4\4th\3\4(W)in(?P<H>\x7d)$

可以使用这个工具:regex101: build, test, and debug regex

可以先将这个正则表达式进行拆解

  • (?![a-z]) Negative Lookahead,后续不能是小写字母
  • ([VHM]{3}) 1st Capturing Group ,即为 HMV
  • (?!\w) Negative Lookahead ,后续不能是字母,数字和下划线
  • (?P<Q>[\{]) Named Capture Group,即为 {
  • R String,即为 R
  • (?![\d]) Negative Lookahead ,后续不能是数字
  • (e) 3rd Capturing Group ,匹配 e
  • g String,即为 g
  • \3 matched by the 3rd capturing group,即为 (e) 的匹配结果,即为 e
  • x String,即为 x
  • (\_{1}) 4th Capturing Group ,后续应该为下划线,即为 _
  • 4 String,即为 4
  • \4 matched by the 4th capturing group,即为 (\_{1}) 的匹配结果,即为 _
  • th String,即为 th
  • \3 matched by the 3rd capturing group,即为 (e) 的匹配结果,即为 e
  • \4 matched by the 4th capturing group,即为 (\_{1}) 的匹配结果,即为 _
  • (W) 5th Capturing Group,即为 W
  • in String,即为 in
  • (?P<H>\x7d) Named Capture Group ,即为 }
  • $ asserts position at the end of a line

综上所述,得到

HMV{Regex_4_the_Win}