Fichas
4.4.2 Regular expressions
Fichas del conjunto (6)
- 1Natural LanguageNatural Language comprises a set of words, and is governed by rules that define the order in which they may be put together.
- 2Natural and Formal LanguageNatural languages have incredibly complex rules – most people who have spoken English all their lives don’t know or understand all of the rules.
Translating from English to French, for example, cannot be reliably performed by a computer, even one programmed with grammatical rules. - 3Formal LanguageA Formal Language is defined using two components:
Its alphabet
Its rules of syntax
The alphabet is a precisely defined, finite set of symbols.
The rules define how to construct strings from the symbols - 4Formal LanguageExample – a formal language is used for describing the hardness of pencils.
The alphabet is {H, B, 1, 2, 3, 4}
The rules are:
The first symbol can be any symbol from the alphabet
The second symbol can be H or B, but must not be the same as the first symbol. - 5Regular ExpressionsRegular expressions are a way of expressing rules for formal languages.
- 6Regular ExpressionsFor example:
a(a|b)* means “a followed by zero or more instances of a or b”
Información
- Descripción
- Fichas sobre 4.4.2 Regular expressions, creado por Ed Allen el 02/06/2020.
- Creado por
- Ed Allen
- Visitas
- 0
- Valoración