regexp查不到数据?
The language of WCDB
Objective-C,
The version of WCDB
v1.0.5
The platform of WCDB
iOS
The installation of WCDB
Cocoapods,
What's the issue?
regexp操作符如何使用 用regexp("[2-5]") 无法匹配到数据, 直接使用sql 查询是可以的~~是我使用方法不对吗?
Please provide the whole data you used or a sample project for us.
Error Message: [WCDB][ERROR]Code:1, Type:SQLite, Tag:0, Op:3, ExtCode:1, Msg:no such function: REGEXP,
As it said, there is not function named REGEXP in SQLite.
Then how to use 'create_function‘ in WCDB to create regexp?
Show your code please.
WCDB version is 1.0.6.1
NSArray *foots = [[DatabaseContext db] getObjectsOfClass:FootprintItem.class fromTable:[self tableName] where: FootprintItem.link.regexp(@"[2-5]")] ;
This is the one row data id link time title "207" "http://baidu_206.com" "20190328162124" "title_206_206"
By default, REGEXP is not created by SQLite.
What would you like to do by REGEXP? What is the demand?
T_T The requirements is to query by regex expression.
According the sqlite official doc,
The REGEXP operator is a special syntax for the regexp() user function. No regexp() user function is defined by default and so use of the REGEXP operator will normally result in an error message. If an application-defined SQL function named "regexp" is added at run-time, then the "X REGEXP Y" operator will be implemented as a call to "regexp(Y,X)".
I think we should add a builtin REGEXP in the future version.
Currently, I have no idea.
OK, Thanks T_T.
i need regex too
我用REGEXP也查不出来。啥情况