Can't figure it out. Basically, I am looking for a correct way to do something like this (which is obviously incorrect, but at least expressive enough to show what's missing):
left=db.auth_user.on(db.sms.sender==re.sub('[^0-9]','',db.auth_user.phone)) On Monday, March 30, 2020 at 11:09:07 AM UTC-4, Vlad wrote: > > I've got the following condition for the left join: > > left=db.auth_user.on(db.sms.sender==db.auth_user.phone) > > the problem is that sms.sender is in a format like 12345678901 while > auth_user.phone can be something like (234)567-8901. Doesn't have to be in > any specific format, but I need to remove any non-digit characters and if > it's 10 digits - to add 1. Only then the 2 strings are comparable. > > How is it possible to do it in web2py / dal? > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/2d246d5e-0648-4016-8916-bca52ffaa150%40googlegroups.com.