I need some help from the RegEx and SQL nerds. ^^
I've a comment field in a table, which content looks like this:
What I need is a DISTINCT list of all user names - eg.
- b.willis
- p.fox
g.clooney
CREATE TABLE IF NOT EXISTS `comments` ( `id` int(11) NOT NULL AUTO_INCREMENT, `comment` varchar(255) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ; INSERT INTO `comments` (`id`, `comment`) VALUES (1, 'test [name](p.fox)[/name]'), (2, 'another test [name](p.fox)[/name]'), (3, 'lalala [name](b.willis)[/name]'), (4, 'lulu [name](g.clooney)[/name]');
Thx!