|
hpoonis2010 Adept
Joined: 18 Jun 2019 Posts: 279
|
Posted: Tue Apr 20, 2021 10:06 am
Strings in key-value pairs |
Here's an interesting one. Thanks to Aardwolf's penchant for allowing nonalpha characters in equipment names, I discovered a glitch.
Item name
an =*= OFFICIAL WTC STUDENT ID BADGE =*= |
When I add this to a key-pair I get
name=an ="*= OFFICIAL WTC STUDENT ID BADGE =*=" |
I went through documentation but could find no visible solution to cater for this effect. I tried wrapping in brackets, single-quoting, which does kind of work but then writes the value enclosed in single-quotes.
'an =*= OFFICIAL WTC STUDENT ID BADGE =*=' |
I would then have to strip those off before every reference (I want to perform an exact match on the name). It is not practical to use %stripq as thjs may affect other item names which may have quotes stupidly strangely elsewhere inside the name.
It is, of course, extremely difficult to deal with item names having access to the full character set, and coming up with solutions to deal with everything which conflicts with (any) mud client special characters/delimiters/etc. Even more so when the person creating a mud item decides that, instead of spaces between words they will use a non-whitespace character (eg., ! | ~). |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4690 Location: Pensacola, FL, USA
|
Posted: Tue Apr 20, 2021 4:11 pm |
You are correct, and I see no way around it and retain the literal pattern.
As a workaround though, you could try just stripping out the = and matching based on that, those are what is messing it up syntactically. |
|
_________________ Discord: Shalimarwildcat |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|