Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re(4): Regular Expression Builder

by Dog and Pony (Priest)
on Sep 02, 2002 at 20:11 UTC ( #194630=note: print w/replies, xml ) Need Help??

in reply to Re: Re: Re: Regular Expression Builder
in thread Regular Expression Builder

After all ldkjdlkjf2098kklls probably isnt [[:alpha:]]+\d+[[:al­pha:]]+
I did play around once with a small script that did these things, when I was bored, and no, it probably isn't. But what I did was take several strings and tried to derive a common expression out of them - first looking for similarities, like a sequence of numbers in the middle, or whitespace at the end, or whatever, and then built sub-regexes from the parts. I think starting with splitting on non-words and such gave so-so results for things like email addresses..

Of course, I never really got any really usable results, but it was a fun exercise. :) What I wanted to say was that do decide which it should be you need a decent sample of several strings that should all match. Then it is sometimes possible to get something to build upon. Maybe. :)

You have moved into a dark place.
It is pitch black. You are likely to be eaten by a grue.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://194630]
[Corion]: Oh yay. Why do I test a migration with transaction code "T" when the real trades from the migration will come with P9N (which is excluded from the processing)?
[Corion]: (nothing that a quick SQL update can't fix in the input data, but why did the people organizing the test not plan that test under real conditions...)

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (11)
As of 2017-09-26 15:15 GMT
Find Nodes?
    Voting Booth?
    During the recent solar eclipse, I:

    Results (296 votes). Check out past polls.