473,473 Members | 1,894 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Alternative to Regular Expressions?

Are there any alternatives to Regular Expressions? The syntax is HORRIBLE!
IF not, has anyone written a program that will construct them for you?

--
"It's easy enough to be pleasant, when life hums along like a song.
But the man worth while is the man who can smile when
everything goes dead wrong.".
Jul 19 '05 #1
4 1799
Bootstrap Bill wrote:
Are there any alternatives to Regular Expressions? The syntax is
HORRIBLE! IF not, has anyone written a program that will construct
them for you?


Not yet, but I'm eagerly waiting for you to do it.

Good luck! :)

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

Jul 19 '05 #2
Bootstrap Bill wrote:
Are there any alternatives to Regular Expressions?
What do you mean by "alternative"? Context-free Expressions?
Context-sensitive Expressions?
Or what?
The syntax is HORRIBLE!
Oh, I see. Well, you are welcome to create a new language that defines REs.
IF not, has anyone written a program that will construct
them for you?


In which language (in the broadest sense) would you tell the program what
kind of REs you want?

jue
Jul 19 '05 #3
Bootstrap Bill wyrzeĽbił(a):
Are there any alternatives to Regular Expressions? The syntax is HORRIBLE!
IF not, has anyone written a program that will construct them for you?


first of all - take a look at Regexp::* modules - they do contain some
of usually needed regexps.

second - what's so horrible about them? i guess that you just learned
that there is something like regexp. and by some accident you happen to
see something long, unreadable and basically awful.

tell me - what's horrible about:
/./
/.*/
/.+/
/[a-z]+/
and so on? this is *readable*, easy to write and easy to understand.

depesz

--
napisanie do mnie na priv daje 99.9% gwarancję braku odpowiedzi
*-----------------------------------------------------------------*
sklep z rzeczami do domu: http://ulek.pl/
Jul 19 '05 #4


Bootstrap Bill wrote:
Are there any alternatives to Regular Expressions? The syntax is HORRIBLE!
IF not, has anyone written a program that will construct them for you?


The following page has info on tools to aid in writing and testing REs:
http://dmoz.org/Computers/Programmin...r_Expressions/
Maybe it will help.

Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Michael McGarry | last post by:
Hi, I am horrible with Regular Expressions, can anyone recommend a book on it? Also I am trying to parse the following string to extract the number after load average. ".... load average:...
24
by: Wim Roffal | last post by:
Is there a possibility to do a string replace in javascript without regular experessions. It feels like using a hammer to crash an egg. Wim
2
by: Sehboo | last post by:
Hi, I have several regular expressions that I need to run against documents. Is it possible to combine several expressions in one expression in Regex object. So that it is faster, or will I...
4
by: Együd Csaba | last post by:
Hi All, I'd like to "compress" the following two filter expressions into one - assuming that it makes sense regarding query execution performance. .... where (adate LIKE "2004.01.10 __:30" or...
7
by: Billa | last post by:
Hi, I am replaceing a big string using different regular expressions (see some example at the end of the message). The problem is whenever I apply a "replace" it makes a new copy of string and I...
3
by: a | last post by:
I'm a newbie needing to use some Regular Expressions in PHP. Can I safely use the results of my tests using 'The Regex Coach' (http://www.weitz.de/regex-coach/index.html) Are the Regular...
25
by: Mike | last post by:
I have a regular expression (^(.+)(?=\s*).*\1 ) that results in matches. I would like to get what the actual regular expression is. In other words, when I apply ^(.+)(?=\s*).*\1 to " HEART...
1
by: Allan Ebdrup | last post by:
I have a dynamic list of regular expressions, the expressions don't change very often but they can change. And I have a single string that I want to match the regular expressions against and find...
12
by: FAQEditor | last post by:
Anybody have any URL's to tutorials and/or references for Regular Expressions? The four I have so far are: http://docs.sun.com/source/816-6408-10/regexp.htm...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.