douhe4336 2012-11-30 21:34
浏览 44
已采纳

如何在mysql的整个数据库表中找到电子邮件地址的存在

I have 1GB mysql database. This is my company database and i have to re-factor the whole site and database.

I have changed the email address in user table but there are still some tables where email address is stored as text in some fields like html data but i don't know

Is there any way to find email pattern in all database tables and replace only that part

  • 写回答

1条回答 默认 最新

  • dongsashe6006 2012-11-30 21:40
    关注

    If you want to find anything that might be an email address, check out the RLIKE operator so you can use a regular expression like \b\S+\@\S+\.\w+\b to find them. It might be faster and more convenient to scan a mysqldump snapshot than the database itself.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 企业资源规划ERP沙盘模拟
  • ¥15 树莓派控制机械臂传输命令报错,显示摄像头不存在
  • ¥15 前端echarts坐标轴问题
  • ¥15 CMFCPropertyPage
  • ¥15 ad5933的I2C
  • ¥15 请问RTX4060的笔记本电脑可以训练yolov5模型吗?
  • ¥15 数学建模求思路及代码
  • ¥50 silvaco GaN HEMT有栅极场板的击穿电压仿真问题
  • ¥15 谁会P4语言啊,我想请教一下
  • ¥15 这个怎么改成直流激励源给加热电阻提供5a电流呀