|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Thu Jun 12, 2008 1:30 am
[2.26] Square character appears in stringlist pattern |
This is probably related to the other list bugs in 2.26 and hopefully already been fixed, but I didn't remember anything about this character appearing specifically, so I thought I'd post it. Method:
1) In the untitled session, enter #var condition {excellent condition|a few scratches|some small wounds and bruises|quite a few wounds|some big nasty wounds and scratches|pretty hurt|awful condition} at the command line.
2) Click Settings on the toolbar to open the PE. Choose Trigger from the New dropdown and paste ^(?:a |the |an )?(?>[\w'-]+ ){1,5}(?:has|is in|looks) (?:@condition)\. into the pattern box.
3) Check Regular Expression and change to the Test tab.
4) A square has appeared in the pattern. Screenshot. |
|
|
|
Brenex Beginner
Joined: 13 May 2008 Posts: 25
|
Posted: Thu Jun 12, 2008 3:26 am |
Also occurs in my case. See picture:
|
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Thu Jun 12, 2008 5:18 am |
The square represents an unprintable character. You see the same sort of thing in ZMud when looking at the code for a datarecord variable. Maybe it's related to the hashing?
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Thu Jun 12, 2008 6:05 am |
Yep, it's fixed for 2.27. It was a "flag" control character used when CMUD expands a string list or database variable so that when converting a trigger pattern the string list can be properly sorted and so wildcards within the string list can be ignored.
The problem was that this flag control character was also getting inserted with regular expression triggers, which don't call the routine to convert a pattern. In 2.27, CMUD properly strips out this control character in regular expression triggers. |
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Thu Jun 12, 2008 3:25 pm |
Zugg, is there any way to make it so we can see and view the whole pearl regex without expanding the package box, and maybe copy and paste it? Would help with using external regex editors.
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Thu Jun 12, 2008 5:30 pm |
Not easily. But if you click the button down in the "More" area next to the "Regular expression" checkbox, then CMUD will convert the current trigger pattern into a regex and then you can copy/paste it from the main Pattern field. Then click the Cancel button to prevent the changes from overwriting your trigger.
|
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Thu Jun 12, 2008 5:59 pm |
Where? I don't see it...
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Thu Jun 12, 2008 6:04 pm |
Look harder? It's a button with a green arrow on it just to the left of the "Regular Expression" checkbox at the bottom of the trigger panel. Click the "More" button at the bottom if the advanced options are not shown. Then move the mouse over the green arrow next to the Regular Expression checkbox and you'll see that it's a button.
But I think that's just what I said in my previous post. |
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Thu Jun 12, 2008 6:10 pm |
I didn't know the green arrow was a button.
Well, it already is a regular expression. Converting it doesn't do anything. I mean for the purposes of removing the variables. The pearl string just puts the variabes in, whereas CMUD keeps them and this it's hard to copy and paste them into an external editor. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Thu Jun 12, 2008 7:14 pm |
Oh, I see what you are talking about...you want to show the variables expanded. I'll think about that. There certainly isn't enough room on the Testing panel for the full expanded pattern, but I'll add an item to the wish-list for some sort of button that would paste it into the clipboard.
|
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Fri Jun 13, 2008 1:38 am |
Thank you, also. Will installing 2.27 get rid of the square, or do I have to redo the variable?
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Fri Jun 13, 2008 2:14 am |
2.27 will get rid of the square. CMUD recompiles patterns the first time they are used and when it expands the value of the variable, it will strip the "square".
|
|
|
|
Brenex Beginner
Joined: 13 May 2008 Posts: 25
|
Posted: Fri Jun 13, 2008 5:20 am |
It works now, but I still have the square shown in the test pattern screen.
|
|
|
|
Brenex Beginner
Joined: 13 May 2008 Posts: 25
|
Posted: Fri Jun 13, 2008 5:20 am |
It works now, but I still have the square shown in the test pattern screen.
|
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Fri Jun 13, 2008 12:25 pm |
Yeah, same. I haven't been able to see if it works, but from Zugg's desc it should, even though the square is still there
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Fri Jun 13, 2008 4:51 pm |
Please confirm whether it works. The square shouldn't still be there, so I think there might still be a problem with it. Unless the routine I'm calling to display the Perl Regex isn't handling the conversion the same way as the routine that actually compiles and executes the trigger. But I'll put it back on the bug list for the future.
|
|
|
|
|
|