Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > regular expression

Reply
Thread Tools

regular expression

 
 
deviantbunnylord@gmail.com
Guest
Posts: n/a
 
      12-25-2006

Rad [Visual C# MVP] wrote:
> On Sun, 24 Dec 2006 16:36:31 +0100, Stef Mientki wrote:
>
> > Dustan wrote:
> >> Kleine Aap wrote:
> >>> Asper Faner wrote:
> >>>
> >>>> I seem to always have hard time understaing how this regular expression
> >>>> works, especially how on earth do people bring it up as part of
> >>>> computer programming language. Natural language processing seems not
> >>>> enough to explain by the way. Why no eliminate it ?


Hi folks, fairly new to the list(Python is my first programming
language, so I'm fairly new to the world of programming too)but this is
a question I've been wondering about since I started learning about the
re module. Are regular expressions what makes mark up languages
interpretable by webbrowsers?

 
Reply With Quote
 
 
 
 
Dustan
Guest
Posts: n/a
 
      12-25-2006

http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> Rad [Visual C# MVP] wrote:
> > On Sun, 24 Dec 2006 16:36:31 +0100, Stef Mientki wrote:
> >
> > > Dustan wrote:
> > >> Kleine Aap wrote:
> > >>> Asper Faner wrote:
> > >>>
> > >>>> I seem to always have hard time understaing how this regular expression
> > >>>> works, especially how on earth do people bring it up as part of
> > >>>> computer programming language. Natural language processing seems not
> > >>>> enough to explain by the way. Why no eliminate it ?

>
> Hi folks, fairly new to the list(Python is my first programming
> language, so I'm fairly new to the world of programming too)but this is
> a question I've been wondering about since I started learning about the
> re module. Are regular expressions what makes mark up languages
> interpretable by webbrowsers?


I don't actually know the answer, but my educated guess:

Regular expressions are just the simplest way to parse any text, but
there are other ways. Webbrowsers most likely depend on regular
expressions just because it's a relatively quick and easy way to
interpret the language.

 
Reply With Quote
 
 
 
 
Steven D'Aprano
Guest
Posts: n/a
 
      12-25-2006
On Mon, 25 Dec 2006 06:17:00 -0800, (E-Mail Removed) wrote:

> Hi folks, fairly new to the list(Python is my first programming
> language, so I'm fairly new to the world of programming too)but this is
> a question I've been wondering about since I started learning about the
> re module. Are regular expressions what makes mark up languages
> interpretable by webbrowsers?


Web browsers have to render HTML, which implies they must be able
to parse and interpret at least one markup language. _How_ they parse the
markup is up to the browser developers.

Since regular expressions are very good at certain types of text parsing,
and are widely available, it is probable that regular expressions are used
in some (many? all?) markup parsers, simply because it is widely available
and is a good tool for some (but not all) parsing tasks. For example,
Python's xmllib module uses reg exps to parse xml.

Essentially, a regular expression engine is a super-charged "find"
command on steroids. But that doesn't mean that reg exps are the only tool
for the job. A markup parser doesn't necessarily need to use regexes.


--
Steven.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Seek xpath expression where an attribute name is a regular expression GIMME XML 3 12-29-2008 03:11 PM
C/C++ language proposal: Change the 'case expression' from "integral constant-expression" to "integral expression" Adem C++ 42 11-04-2008 12:39 PM
C/C++ language proposal: Change the 'case expression' from "integral constant-expression" to "integral expression" Adem C Programming 45 11-04-2008 12:39 PM
Matching abitrary expression in a regular expression =?iso-8859-1?B?bW9vcJk=?= Java 8 12-02-2005 12:51 AM
Dynamically changing the regular expression of Regular Expression validator VSK ASP .Net 2 08-24-2003 02:47 PM



Advertisments