Free Republic
Browse · Search
Bloggers & Personal
Topics · Post Article

To: Danae

Regex with a good editor or Grep is a very powerful combination of tools. The problem with Regex is that use of that tool on a database requires extreme data structure.

I have used Regex and Grep to extract structure information from a 3,000 page cagalog. (small in comparison to this) That catalog was composed in Quark with a scripted input plug-in.

XML is another structure that lends itself to this type of editing.

The use as an excuse in this case is clearly total BS.


3 posted on 10/27/2011 10:26:36 PM PDT by Texas Fossil (Government, even in its best state is but a necessary evil; in its worst state an intolerable one)
[ Post Reply | Private Reply | To 1 | View Replies ]


To: Texas Fossil

I completely agree. Regex is so brittle, that a .* instead of a \S is gonna break something bad enough to be noticed. bad enough that it would never make it past QA if it ever got that far. Not left in place for years...

More on that tomorrow!


4 posted on 10/27/2011 10:31:36 PM PDT by Danae (Anailnathrach ortha bhais beatha do cheal deanaimha)
[ Post Reply | Private Reply | To 3 | View Replies ]

To: Texas Fossil

BTTT


7 posted on 10/28/2011 7:50:06 AM PDT by Danae (Anailnathrach ortha bhais beatha do cheal deanaimha)
[ Post Reply | Private Reply | To 3 | View Replies ]

To: Texas Fossil

Regex is, quite simply, the wrong tool to use in most cases.

Like you said, if your data isn’t structured in a particular way it doesn’t work; but more than that it’s VERY easy to leave out some case when writing one. (I’ve had to do a few of those corrections, not fun; and in my experience if it’s even moderately complicated it’s going to change.)

I don’t really trust regex for anything more complicated than a) removal of certain characters, and b) *simple* transforms, like perhaps changing cases.


9 posted on 10/28/2011 6:34:53 PM PDT by OneWingedShark (Q: Why am I here? A: To do Justly, to love mercy, and to walk humbly with my God.)
[ Post Reply | Private Reply | To 3 | View Replies ]

Free Republic
Browse · Search
Bloggers & Personal
Topics · Post Article


FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson