![](templates/Classic/images/spacer.gif) |
laysus Newbie
Joined: 25 Oct 2005 Posts: 6
|
Posted: Thu Apr 17, 2008 1:58 pm
[2.22] %subregex problem |
I've found a small issue with %subregex in 2.22, in that when I attempt to perform a %subregex(arg1, arg2, arg3), I get a null value returned if arg1 doesn't contain arg2 at all. That is to say, #show %subregex("thing","-","0") returns nothing while #show %subregex("thing-","-","0") will return "thing0".
|
|
|
![](templates/Classic/images/spacer.gif) |
gamma_ray Magician
Joined: 17 Apr 2005 Posts: 496
|
Posted: Thu Apr 17, 2008 6:41 pm |
Confirmed here. Annoying. :/
|
|
|
![](templates/Classic/images/spacer.gif) |
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Thu Apr 17, 2008 7:30 pm |
It doesn't show in 2.18, so it's something new.
|
|
|
![](templates/Classic/images/spacer.gif) |
Fang Xianfu GURU
![](images/avatars/1763170544a2093e7e85da.gif)
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Thu Apr 17, 2008 10:38 pm |
%subregex has been changed completely since 2.18, so differences should come as no surprise.
|
|
|
![](templates/Classic/images/spacer.gif) |
JQuilici Adept
Joined: 21 Sep 2005 Posts: 250 Location: Austin, TX
|
Posted: Thu Apr 17, 2008 10:46 pm |
I believe this is a dup of the bug reported here.
So it looks like Zugg hasn't applied Vijilante's fix in 2.22. |
|
_________________ Come visit Mozart Mud...and tell an imm that Aerith sent you! |
|
|
![](templates/Classic/images/spacer.gif) |
Vijilante SubAdmin
![](images/avatars/7230815434153eca6be3ad.gif)
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Fri Apr 18, 2008 2:05 am |
I am working on a major rewrite of the routine because I was completely dissatisfied with the speed test results I was getting. I am also adding some features I thought would be really good. Hopefully I will have all of it done soon enough that Zugg has plenty of time to review it for 2.23.
In any case the correct behavior is to return the full stirng with whatever modifications occured. A state of no modifications should result in the original string being returned, and I will make sure that it works that way after my rewrite.
As always Zugg gets the final decision whether to use any part of what I write, I am doing it more as a personal mission and a small gift. |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
![](templates/Classic/images/spacer.gif) |
Zugg MASTER
![](images/avatars/164475849040f41c23b22fe.gif)
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Wed Apr 23, 2008 7:49 pm |
Hmm, I thought I had applied the latest code that Vijilante had sent me. Vij: You want to send me your latest code this week so that I can get it into the 2.23 version? No pressure ;)
|
|
|
![](templates/Classic/images/spacer.gif) |
Taz GURU
Joined: 28 Sep 2000 Posts: 1395 Location: United Kingdom
|
Posted: Wed Apr 23, 2008 7:55 pm |
He's working on it as per his other thread, you'll probably see that when you've finished catching up. He hopes to have new code to you by the end of the week.
|
|
_________________ Taz :) |
|
|
![](templates/Classic/images/spacer.gif) |
Vijilante SubAdmin
![](images/avatars/7230815434153eca6be3ad.gif)
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Thu Apr 24, 2008 12:12 am |
Yeah, I have been testing its quickly as I can. I got stuck with the old problem pattern like "a?". The logic I was playing with to make this better broke many other things. Pretty much I wasted my programming time today trying everything imaginable to get that pattern to be happy without killing everything else. I even went so far as to backup one file and then try a whole new design for that portion.
Also looking back through my email log it would seem I forgot to send the fix for the null return. I can't make this any higher priority then it already is. I should be able to find and quash the remaining bugs in my new code, and get something to you tommorrow. |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
![](templates/Classic/images/spacer.gif) |
Vijilante SubAdmin
![](images/avatars/7230815434153eca6be3ad.gif)
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Thu Apr 24, 2008 9:31 pm |
I got everything to pass the final exam, which uses every feature I added all at once. It may not be bug free since my real testing scenario would be to run through every single test again and make sure I haven't mussed any of them.
In any case I do have about a number of things yet to try for improving the handling of pattern like "a?", but it can wait. Files are on there way. |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
![](templates/Classic/images/spacer.gif) |
|
|