MySQL从文本字段中提取单个单词

时间:2013-12-16 21:38:16

标签: mysql text

这是我的表格的样子

----------------------------+-----------+
| tw_dt                          | text                                                                                                                                         | ID        |
+--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+-----------+
| Thu Dec 12 19:14:13 +0000 2013 | #CoSignCountdown airs MON-FRI @7p send in your hottest song to cosigncountdown@gmail.com Original music ONLY!!! #TEAMFOLLOWBACK @HipHopDotCA |  14985388 |
| Thu Dec 12 19:14:12 +0000 2013 | "Get any Beat at http://t.co/R61XJ5EYUQ for $200 each. Exclusive Rights. To pruchase - GummyBeatz@Gmail.com"                                 | 170900539 |
| Thu Dec 12 19:14:09 +0000 2013 | "@iwantmixedbabys PREMO is looking for Models for the SuperBadd fashionshow January10th 3000 EXPECTED email us premopresents@gmail.com"      | 343062689 |
| Thu Dec 12 19:14:09 +0000 2013 | mixtape hosting contact . bookdjlyrical@gmail.com                                                                                            |  99644471 |
| Thu Dec 12 19:14:09 +0000 2013 | checkout http://t.co/4f2txyVpLy  RIGHT NOW!!!! #Artist send in music and videos to preciseearz@gmail.com #BlogsAreTheNewMixtapes             |  27872863 |
| Thu Dec 12 20:01:10 +0000 2013 | ATTENTION ARTISTS: DO YOU NEED US TO HELP YOU PROMOTE YOUR MUSIC?!? EMAIL US FOR OUR PROMO PACKAGES AT VIEWHIPHOP@gmail.com                  | 357913081 |
| Thu Dec 12 20:01:10 +0000 2013 | RT @ITSMIKESWAGGER: @Mike_Bell1 no doubt my artist appreciates the love mikeswagger@gmail.com hit me up                                      | 165499064 |
| Thu Dec 12 20:01:10 +0000 2013 | @grandst @cmj_333  - swking1964@gmail.com is my Santa - but just needs to be aware of your site in General! Happy Holidays!                  | 574317429 |
+--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+-----------+

我想从文本中提取电子邮件地址,因为它是自己的列。

关于我如何在MYSQL中实现这一点的任何想法?

1 个答案:

答案 0 :(得分:0)

嗯,这个huge regex用于匹配电子邮件地址。结合找到here的正则表达式替换解决方案,你应该很高兴。

相关问题