regular expression

A

Asper Faner

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 ?
 
P

Paddy

Asper said:
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 ?
If you try to eliminate what you don't understand you won't learn
anything!

I suggest that you put the learning of regexps aside for a while and
come back to it 'later'.
 
E

Erwin Moller

Asper said:
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 ?

I am sure you'll get an answer in one of zillion groups you posted this
stupid question to...

Regards,
Erwin
 
K

Kleine Aap

Asper said:
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 ?

I.M.H.O. anyone that is not capable to grasp the concept of regular
expressions should not attempt to write computer programs at all! My
suggestion to you would be to find a job that involves working with your
hands...
 
R

Roman

Asper said:
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 ?

It has very much to do with computer programming. There is program flow,
conditions, loops, variables.

Roman
 
A

aejw.com

Also regular expressions are (pretty much) universal accross a ton of
languages... even search engines now provide some support for regular
expressions... I know its a bit of a headache, but keep trying to learn it
mate. Once you have it wrapped you will never look back.

Adam - http://www.aejw.com/?page=contact
 
J

Joe Kesselman

Reminder: anything crossposted across this many newsgroups, especially
asking an inherently bogus question, is probably just trolling.

If it's equally on topic everywhere, that means it's on topic nowhere.
 
D

Dustan

Kleine said:
I.M.H.O. anyone that is not capable to grasp the concept of regular
expressions should not attempt to write computer programs at all! My
suggestion to you would be to find a job that involves working with your
hands...

Your humble opinion doesn't get much ruder...

Perhaps you meant "anyone that is not capable to grasp the concept of
regular expressions after some experience with programming should not
attempt to write computer programs at all!" Then at least newbies would
have a leg to stand on.

Otherwise, you're practically cutting off all entrances into the world
of programming! The concept of regular expressions isn't exactly the
simplest one out there. Just because you understood it immediately
(which I'm guessing you did, considering your harsh response), doesn't
mean others find the concept that simple.
 
S

Stef Mientki

Dustan said:
Your humble opinion doesn't get much ruder...

Perhaps you meant "anyone that is not capable to grasp the concept of
regular expressions after some experience with programming should not
attempt to write computer programs at all!" Then at least newbies would
have a leg to stand on.

Otherwise, you're practically cutting off all entrances into the world
of programming! The concept of regular expressions isn't exactly the
simplest one out there. Just because you understood it immediately
(which I'm guessing you did, considering your harsh response), doesn't
mean others find the concept that simple.
I agree, and in addition:

(large) regular expressions are easy to write,
but can be almost impossible to read back !

I once had a program to generate and evaluate regular expressions,
but can't find it anymore :-(

If someone has links to regex generators/evaluators,
I'ld be much obliged.

cheers.
Stef Mientki
 
R

Rad [Visual C# MVP]

I agree, and in addition:

(large) regular expressions are easy to write,
but can be almost impossible to read back !

I once had a program to generate and evaluate regular expressions,
but can't find it anymore :-(

If someone has links to regex generators/evaluators,
I'ld be much obliged.

cheers.
Stef Mientki

A good tool to write, test and analyse regexes is the Regulator, available
here http://sourceforge.net/projects/regulator/

A good reference site is http://www.regular-expressions.info/, with
tutorials, examples and tools
 
D

deviantbunnylord

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?
 
D

Dustan

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.
 
S

Steven D'Aprano

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top