Bug Stomp
Upgrades and changes sometimes have unpredictable results, so post your bugs and glitches in here and I'll get out my trusty wrench and get to fixin'!
Posts 6,047 - 6,058 of 8,682
"It would be helpful is someone would post their most complex regex that works"
For me that's probably:
^m([ei]+)n(e|)(s|)(n|)(r|) l([ueü]+)ft([ -]|)ki([s]+)en([fv])a(h|)rz([eu]+)g ist vo([l]+) (*) ([a]+)([l]+)en$ (re)
not actually as complex as it looks - just a bit of Monty Python meets experimental German spell/grammar-checking that came out of a previous discussion some months back.
Also, the "*" and "+" quantificators seem to behave both as "*".
Uh, no.* is a standard soft wildcard, and ([s]+) in a regex = any number of ss.
I think a lot of the problem here is that the regex system we're using is not a fully regex environment, it's a subset. The AIEngine processes all keyphrases using*/(*) wildcards and local plugins as regexes, even without (re) - Basically it's in regex mode the whole time. When we specify "(re)" we get a sort of shell access to deeper regex functions, but it's not the whole regex environment - some functions are reserved by the AIEngine (including . I imagine.)
I'm used to using it to make a specific string optional, as in (his|here)? Meaning zero or more occurances of that group.
Well,(his|here|) would do that, wouldn't it? "his", "here" or nothing...
Posts 6,047 - 6,058 of 8,682
psimagus
19 years ago
19 years ago
For me that's probably:
not actually as complex as it looks - just a bit of Monty Python meets experimental German spell/grammar-checking that came out of a previous discussion some months back.
Calandale
19 years ago
19 years ago
Hmmm...I was hoping to see something using ? or .
These are pretty standard, but I haven't gotten them working correctly.
These are pretty standard, but I haven't gotten them working correctly.
psimagus
19 years ago
19 years ago
? is handy in some numerical contexts, but in a linguistic setting when what we primarily need to match are typos, gerunds, conjugations and occasional punctuation, what would a single character wildcard actually be useful for? I imagine it works, but I have never found the need to try it.
herode
19 years ago
19 years ago
I tried using "?", with no success. Also, the "*" and "+" quantificators seem to behave both as "*".
Obviously, there is a syntactic problem about "." and "?". These quantificators are also punctuation symbols. In a true regex, you have to escape them in order to gain access to the punctuation symbol. Unescaped, they are read as quantificators. But in our keyphrases, a period is a period and so on. And you cannot enter punctuations.
Obviously, there is a syntactic problem about "." and "?". These quantificators are also punctuation symbols. In a true regex, you have to escape them in order to gain access to the punctuation symbol. Unescaped, they are read as quantificators. But in our keyphrases, a period is a period and so on. And you cannot enter punctuations.
Calandale
19 years ago
19 years ago
I'm used to using it to make a specific string optional, as in (his|her)? Meaning zero or more occurances of that group.
psimagus
19 years ago
19 years ago
Uh, no.
I think a lot of the problem here is that the regex system we're using is not a fully regex environment, it's a subset. The AIEngine processes all keyphrases using
Calandale
19 years ago
19 years ago
I really wish that the link to the regex system was working. I suppose no one has an electronic copy of it lying about?
psimagus
19 years ago
19 years ago
Well,
Calandale
19 years ago
19 years ago
Sure, I'm just used to thinking differently, I guess. I had just thought of that, and came to post about it.
MickMcA
19 years ago
19 years ago
>>Well, (his|her|) would do that, wouldn't it?
>>"his", "here" or nothing...
However, in both cases you run into the "key count" problem. I've burned repeatedly by doing things like
(do|) (you|) (verb)
only to discover that the Key# of (verb) is based on the number occupied keys, NOT its position in the KP. For example, "dance" is key3 of "do you dance" but key2 of "you dance."
M
>>"his", "here" or nothing...
However, in both cases you run into the "key count" problem. I've burned repeatedly by doing things like
(do|) (you|) (verb)
only to discover that the Key# of (verb) is based on the number occupied keys, NOT its position in the KP. For example, "dance" is key3 of "do you dance" but key2 of "you dance."
M
» More new posts: Doghead's Cosmic Bar