A regular expression is ...
I still didn't really understand the meaning of 'regular'. What is regular language? why they are regular? and how regular is regular? Because the word 'regular' is too ambiguous to be understood. Is it really mean 'regular'? Is it similar in meaning with 'regular' in '
i'm his regular customer'? or does it refer to something else? I already red the book by Arto Salooma (Jewels of Formal Language Theory). What i can understand is regular expression is a regular pattern to identify regular language, and regular language is a language that can be accepted by DFA. But i'm still have something in my instinct that keep saying this is not the complete answer (for sure it is not Salomaa's fault, since he's a REGULAR in formal theory!). So i'm still keep searching to complete my record...
[ Update: 29th August 2008]
Now i understand what is 'regular' -
a pattern or procedure.
- in accordance with fixed order or procedure or
principle; "his regular calls on his customers"; "regular meals";
"regular duties"
- regular(a): often used as intensifiers; "a regular morass of details"; "a regular nincompoop"; "he's a veritable swine"
- conforming to a standard or pattern; "following the regular procedure of the legislature"; "a regular electrical outlet"
- regularly scheduled for fixed times; "at a regular meeting of the PTA"; "regular bus departures"
- in accord with regular practice or procedure; "took his regular morning walk"; "her regular bedtime"
- even: occurring at fixed intervals; "a regular beat"; "the even rhythm of his breathing"
- relating to a person who does something regularly; "a regular customer"; "a steady drinker"
- (used of the military) belonging to or engaged in by legitimate army forces; "the regular army"
- (of solids) having clear dimensions that can be measured; volume can be determined with a suitable geometric formula
- unconstipated: not constipated
- a regular patron; "an habitue of the racetrack"; "a bum who is a Central Park fixture"
- even: symmetrically arranged; "even features"; "regular features"; "a regular polygon"
- a soldier in the regular army
- not deviating from what is normal; "her regular bedtime"
- a dependable follower (especially in party politics); "he is one of the party regulars"
- officially full-time; "regular students"
- a garment size for persons of average height and weight
wordnet.princeton.edu/perl/webwn
I'm
sure this definition
would we sufficient to understand what is regular expression. Why i'm
saying it is a pattern? Well, regular expression describe a pattern of
a language. It is a procedure because regular expression is a
'procedure' or steps on how to recognize a language (i'm referring
'steps' as sequence of characters trail). Basically we can convert
regular expression into automaton to recognize regular language
(Navarro et al, 2002:pp 77). It seems not so difficult to transform
regular pattern into automata. But i haven't try it, hopefully soon.
A language is regular if there is an automata or FSA that can accept it - wiki. One can build an automata using transition diagram or transition table.
________________________________________________
References:
- Navarro, Gonzalo, Raffinot, Mathiu (2002) Flexible Pattern Matching in Strings. Cambridge University Press.
