On Wed, 01 Jun 2011 15:16:33 +0800, yinxb wrote:
Hianother question,the following query can get uris that contain "rm" It seems '.' take no effect in \".rm \" Anyone can give me a hint? ---------------- "SELECT nie:url(?video) WHERE{" "?video a nfo:FileDataObject" " .FILTER regex(nie:url(?video), \".rm\")" "}"; ----------------
Yes, the "." means "anything" in regex language... Btw, you probably want to filter on the mimetype rather than the extension. And if you really want to filter on the extension, I'd rather recommend something like FILTER(fn:ends-with(nie:url(?video), ".rm")). Cheers Adrien
在 2011-06-01三的 15:10 +0900,simon hong写道:Hi, I used to use following query to get mp3 files containing "Bobby" word. SELECT nie:url(?u) WHERE { ?u a nmm:MusicPiece FILTER regex( nie:url(?u),\"Bobby\") If you use rmvb instead of Bobby, you can get files containg "rmvb" word. On Wed, Jun 1, 2011 at 10:21 AM, yinxb <[email protected]> wrote: HiI am new to Tracker,now I need to tracker files with rm/rmvbextension,the sparql is as followed: ------------------------ static const QString SqlGetAllVideosWithExtension = "SELECT nie:url(?video) WHERE{" "nfo:FileDataObject ?video " " .FILTER regex(nie:url(?video), \"^rmvb\")" "}"; ------------------------- but I cannot get any result. Can anyone give me some hint? Thanks.---------------------------------------------------------------------------------------------------Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s)is intended only for the use of the intended recipient and maybe confidential and/or privileged of Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is not the intended recipient, unauthorized use, forwarding, printing, storing, disclosure or copying is strictly prohibited, and may be unlawful.If you have received this communication in error,pleaseimmediately notify the sender by return e-mail, and delete theoriginal message and all copies from your system. Thank you.---------------------------------------------------------------------------------------------------_______________________________________________ tracker-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/tracker-list -- ====================================== Simon Hong "Secret of success is consistency to purpose"--------------------------------------------------------------------------------------------------- Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s) is intended only for the use of the intended recipient and may be confidential and/or privileged of Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is not the intended recipient, unauthorized use, forwarding, printing, storing, disclosure or copying is strictly prohibited, and may be unlawful.If you have received this communication in error,please immediately notify the sender by return e-mail, and delete the original message and all copies from your system. Thank you. --------------------------------------------------------------------------------------------------- _______________________________________________ tracker-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/tracker-list
_______________________________________________ tracker-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/tracker-list
