Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
For those of you interested in using Regular Expressions from within KiXtart, please review and comment on the code below. I wanted to get some feedback before formalizing them and posting to the UDF forum.
Maybe for me, I would be interested in it. I could think of a pretty interesting example where you would do a search and replace where you could increment the replacement.
Kent
[ 10. September 2003, 23:26: Message edited by: kdyer ]
Registered: 2000-11-27
Posts: 1222
Loc: Gothenburg, Sweden
Howard, I know this is an old thread, but I use these UDF's quite extensively, think I maybe have found something in the RegExpFind() function, and it is that it only returns the first subset match (ie, the first set of groups in a regex query, where the expression matches several groups). Too long to explain here, catch me on MSN Howard
I have it, but don't use it too much in day to day use. But comes in handy when you do need it. I suppose a lot has to do with what type of work you're doing.
Howard, I would bet that it's also not used much because of the complexity of regular expressions in general. Once someone does use it though and gets good results from it, I'm sure they'll use it more and more.
Registered: 2000-11-27
Posts: 1222
Loc: Gothenburg, Sweden
yeah it's true that it has a somehwat high learning threshold. Doing basic stuff is quite easy though, if you just got some examples to look at. The documentation isn't very intuitive either, even though many have tried - at least I haven't found a good source.
btw, who uses KiX for loginscripts nowadays anyhow? It's me' general swiss army knife
Registered: 2003-01-28
Posts: 4396
Loc: New Jersey
Hmm?? I'm actually still using the "same basic" login script from 1995 / Kix 2.x. Well, the logic's the same - I finally rewrote it last month to replace the subroutines with UDFs, just as an exercise.
Of course, KiX is SO MUCH MORE than a login script processor! I'm not sure that "swiss army knife" even does it justice.
BTW - RegEx is "wicked cool" - it's one reason I still use VI / VIM for my script editor! (.! is the other!)
Glenn
_________________________ Actually I am a Rocket Scientist!