• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Why are they called Regular Expressions

 
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Im just curious. What are regular expression and why are they called regular expression.
 
Ranch Hand
Posts: 326
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Interesting question. A quick trip to FOLDOC revealed the following:

The earliest form of regular expressions (and the term itself) were invented by mathematician Stephen Cole Kleene in the mid-1950s, as a notation to easily manipulate "regular sets", formal descriptions of the behaviour of finite state machines, in regular algebra. [/QUOTE ]
the full definition
[ April 14, 2004: Message edited by: Ray Stojonic ]

 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Quote from www.regular-expressions.info :
A regular expression, or regex for short, is a special text string for describing a search pattern. You can think of regular expressions as wildcards on steroids.

 
Ranch Hand
Posts: 348
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
some history background about regular expression,
Regular expression came from a mathematical notation devised by Stephen Kleene in the 1950s for describing regular sets.
Regular expression remained in the realm of mathematics until 1968 when
Ken Thompson, a Bell Labs researcher and Unix pioneer, developed a regular
expression-based search algorithm eventually integrated into the Unix ed text editor.
right now, regular expression-matching engines fall into two categories :
Determinisitc Finite Automation (DFA) and Nondeterministic Finite Automation (NFA). Their difference have to do with how expressions are compiled and how they are matched against the target.
DFA is usually faster because it does more work up front build a matching tree from which unreachable branches are pruned as matching progress.
NFA is slower because it perform a more exhaustive search and oftens need to backtrack. But NFA is more full-featured than DFA.
The java.util.regex is NFA.
 
You're not going crazy. You're going sane in a crazy word. Find comfort in this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic