Une
expression rationnelle, ou
expression régulière (traduction de l'anglais ), est, en
informatique, une
chaîne de caractères que l’on appelle parfois un motif et qui décrit un
ensemble de chaînes de caractères possibles selon une syntaxe précise. Les expressions rationnelles sont issues des théories mathématiques des
langages formels des
années 1940. Leur capacité à décrire avec concision des
ensembles réguliers explique qu’elles se retrouvent dans plusieurs domaines scientifiques dans les années d’
après-guerre et justifie leur adoption en
informatique. Les expressions rationnelles sont aujourd’hui utilisées par les informaticiens dans l’édition et le contrôle de texte ainsi que dans la manipulation des langues formelles que sont les
langages de l’informatique.