代码片段
Turn a debugged regular expression into ready-to-use code snippets in JavaScript, PHP, Python, Go, or Java with one click. Escaping and flag differences are handled automatically, so you can paste the code straight into your project.
/pattern/flags literal, supports g/i/m/s/u/ypreg_match_all style, JS-only g/y/d flags filtered outre.findall, flags mapped to re.I/re.M/re.Sregexp.MustCompile, flags expressed inline as (?i)(?m)(?s)Pattern.compile, supports CASE_INSENSITIVEThe page includes 17 common regex presets (Chinese characters, double-byte characters, email, URL, phone, QQ, postal code, ID card, dates, and various integers/floats). Click one to fill it in and generate code for the selected language.