Shabbir Suterwala

Forum Replies Created

Viewing 5 replies – 1 through 5 (of 5 total)
  • Author
    Replies
  • in reply to: sqlite queries #82594
    Shabbir Suterwala
    Participant

      First 2 numbers are byte offsets & lengths. 2nd 2 numbers character offsets and lengths. They will be the same for ASCII characters but different for multi-byte character sets.

      in reply to: sqlite queries #82592
      Shabbir Suterwala
      Participant

        No. SMATREGEXP() and SMATREGEXPDETAIL() work on MessageContent field only and by default. No need to specify that. For other fields use REGEXP(). There is no REGEXPDETAIL() yet.

        SMATREGEXP() and SMATREGEXPDETAIL() take care of encoding issues in MessageContent. By default UTF8 encoding is used, unless user specifies any other encoding. Let me know if you want details on that.

        Please note that these are internal functions and may not have support or documentation.

        in reply to: sqlite queries #82590
        Shabbir Suterwala
        Participant

          select SMATREGEXPDETAIL(”, rowid, ‘main’) from smat_msgs where SMATREGEXP(”, rowid, ‘main’) > 0;

          I believe the above is correct. I will double check and confirm.

          Thanks

          Shabbir

          in reply to: sqlite queries #82588
          Shabbir Suterwala
          Participant

            We do not provide capturing capability. However we provide a function called SMATREGEXPDETAIL() in 6.1.1 (about to be released), which will give you offsets and lengths of regex matches. Then you can run sqlite’s substr() function to extract strings.

            in reply to: sqlite queries #82587
            Shabbir Suterwala
            Participant

              >./sqlite3 your.smatdb

              sqlite> .load sqlite3-regex[.dll/.so]  <


               edited

              sqlite> select MessageContent from smat_msgs where SMATREGEXP(”, rowid, ‘main’) > 0;

              Substitute appropriately.

              This will work only when your messages are in UTF8. If they are in some other encoding then there are few extra steps between .load and select

            Viewing 5 replies – 1 through 5 (of 5 total)