[Developers] pattern-matching syntax for =~ constraint in MQL
David Flanagan
david at davidflanagan.com
Tue Apr 15 20:40:05 UTC 2008
Answering my own question here, it appears that using * in quotes,
causes it to match a single word.
So the pattern I should use in my query is:
"name~=": "\"^The *$\""
The pattern ^*$ matches strings that are single words. The pattern * by
itself seems to match anything. I'm still not exactly sure what the
matching rules are, but I can make the examples in my documentation work
again.
David
David Flanagan wrote:
> The * in the query below used to match a single word:
>
> [{
> "type" : "/music/artist",
> "name" : null,
> "name~=" : "^The *$"
> }]
>
> So this query would return The Clash, but not The Mighty Mighty
> Bosstones. That's changed: the * now seems to match any string.
>
> Can anyone tell me if there is any new syntax to match a single word?
>
> David
> _______________________________________________
> Developers mailing list
> Developers at freebase.com
> http://lists.freebase.com/mailman/listinfo/developers
>
More information about the Developers
mailing list