Regular Expressions 101

Save & Share

Flavor

  • PCRE2 (PHP >=7.3)
  • PCRE (PHP <7.3)
  • ECMAScript (JavaScript)
  • Python
  • Golang
  • Java 8

Function

  • Match
  • Substitution
  • List
  • Unit Tests
/
dXNpbmcgU3lzdGV.GtLklPOw0KdXNpbmcgU3lzdGVtOw0KDQpjbGFzcyBQcm9 ncmFtDQp7,eDQogICAgc3RhdGljIHZvaWQgTWFpbigpDQogICAgew0KICAgIC AgICBzdHJpbmcgbGluZSA9ICIwNTIgMDU1.hIDA1NCAwNTMgMDU0IDA1NiAwN TQgMDUzIDA1MCAwNDggMD,eU1IDA5NyAwNTUgMDUzIDA1MCAwNDggMDUyIDEw MSAwNT,zAgMDQ4IDA1MCAxMDEgMDUxIDA1MCAwNTEgMDUwIDA1MSAwNTEgMDU wIDA0OCAwNTIgMDUzIDA1MCAwNDggMDUwIDEwMSAwNT.uEgMDUyIDA1MSAwNT AgMDUxI,NDA1MyI7DQogICAgICAgIHN0cmluZ1tdIHNwbCA9IGxpbmUuU3Bsa XQobmV3IGNoYXJbXXsnICd9KTsNCiAgICAgI.2CAgZm9yZWFjaChzdHJpbmcg cyBpbi,1BzcGwpDQogICAgICAgIHsNCiAgICAgICAgICAgIGludCBkID0gU3l zdGVtLkNvbnZlcnQuVG9JbnQzMih.6zKTsNCiAgICAgICAgICAgIGNoYXIgYy A9IFN5c.E3RlbS5Db252ZXJ0LlRvQ2hhcihkKTsNCiAgICAgICAgICAgIENvb nNvbGUuV3JpdGUoYyk7DQogICAgICAgIH0gICAgDQogICA.4gfQ0KCS8vIGJp dC5s,1eS8xb2Z6d.63J2DQp9
/
dXNpbmcgU3lzdGV
matches the characters dXNpbmcgU3lzdGV literally (case sensitive)
. matches any character (except for line terminators)
GtLklPOw0KdXNpbmcgU3lzdGVtOw0KDQpjbGFzcyBQcm9 ncmFtDQp7,eDQogICAgc3RhdGljIHZvaWQgTWFpbigpDQogICAgew0KICAgIC AgICBzdHJpbmcgbGluZSA9ICIwNTIgMDU1
matches the characters GtLklPOw0KdXNpbmcgU3lzdGVtOw0KDQpjbGFzcyBQcm9 ncmFtDQp7,eDQogICAgc3RhdGljIHZvaWQgTWFpbigpDQogICAgew0KICAgIC AgICBzdHJpbmcgbGluZSA9ICIwNTIgMDU1 literally (case sensitive)
. matches any character (except for line terminators)
hIDA1NCAwNTMgMDU0IDA1NiAwN TQgMDUzIDA1MCAwNDggMD,eU1IDA5NyAwNTUgMDUzIDA1MCAwNDggMDUyIDEw MSAwNT,zAgMDQ4IDA1MCAxMDEgMDUxIDA1MCAwNTEgMDUwIDA1MSAwNTEgMDU wIDA0OCAwNTIgMDUzIDA1MCAwNDggMDUwIDEwMSAwNT
matches the characters hIDA1NCAwNTMgMDU0IDA1NiAwN TQgMDUzIDA1MCAwNDggMD,eU1IDA5NyAwNTUgMDUzIDA1MCAwNDggMDUyIDEw MSAwNT,zAgMDQ4IDA1MCAxMDEgMDUxIDA1MCAwNTEgMDUwIDA1MSAwNTEgMDU wIDA0OCAwNTIgMDUzIDA1MCAwNDggMDUwIDEwMSAwNT literally (case sensitive)
. matches any character (except for line terminators)
uEgMDUyIDA1MSAwNT AgMDUxI,NDA1MyI7DQogICAgICAgIHN0cmluZ1tdIHNwbCA9IGxpbmUuU3Bsa XQobmV3IGNoYXJbXXsnICd9KTsNCiAgICAgI
matches the characters uEgMDUyIDA1MSAwNT AgMDUxI,NDA1MyI7DQogICAgICAgIHN0cmluZ1tdIHNwbCA9IGxpbmUuU3Bsa XQobmV3IGNoYXJbXXsnICd9KTsNCiAgICAgI literally (case sensitive)
. matches any character (except for line terminators)
2CAgZm9yZWFjaChzdHJpbmcg cyBpbi,1BzcGwpDQogICAgICAgIHsNCiAgICAgICAgICAgIGludCBkID0gU3l zdGVtLkNvbnZlcnQuVG9JbnQzMih
matches the characters 2CAgZm9yZWFjaChzdHJpbmcg cyBpbi,1BzcGwpDQogICAgICAgIHsNCiAgICAgICAgICAgIGludCBkID0gU3l zdGVtLkNvbnZlcnQuVG9JbnQzMih literally (case sensitive)
. matches any character (except for line terminators)
6zKTsNCiAgICAgICAgICAgIGNoYXIgYy A9IFN5c
matches the characters 6zKTsNCiAgICAgICAgICAgIGNoYXIgYy A9IFN5c literally (case sensitive)
. matches any character (except for line terminators)
E3RlbS5Db252ZXJ0LlRvQ2hhcihkKTsNCiAgICAgICAgICAgIENvb nNvbGUuV3JpdGUoYyk7DQogICAgICAgIH0gICAgDQogICA
matches the characters E3RlbS5Db252ZXJ0LlRvQ2hhcihkKTsNCiAgICAgICAgICAgIENvb nNvbGUuV3JpdGUoYyk7DQogICAgICAgIH0gICAgDQogICA literally (case sensitive)
. matches any character (except for line terminators)
4gfQ0KCS8vIGJp dC5s,1eS8xb2Z6d
matches the characters 4gfQ0KCS8vIGJp dC5s,1eS8xb2Z6d literally (case sensitive)
. matches any character (except for line terminators)
63J2DQp9
matches the characters 63J2DQp9 literally (case sensitive)
Your regular expression does not match the subject string.

Regular Expression
No Match

/
/

Test String