in reply to Re: Simple little regex to build a list
in thread Simple little regex to build a list

Ah.. That is the little bit of perl wisdom I was missing:
my @aliases = $sql =~ /\bas\s+(\w+)/ig;
I didn't know I could build up a list from the result of a regex.. but I sort of hoped I could.

Its the little ways things can be combined that makes perl so much fun.

The good news for all you worried monks is that I am only looking at the tables section of the SQL (I break my SQLs into $tables, $field, $where and $order)

The other good news is that I alway use 'as' in this particular application.

So good news all around!

Thanks monks.

PS I try not to use modules as I mostly work on virtual hosts and I dont have that much control.

___ /\__\ Creative Object World COW \/__/ www.wolispace.com/cow "What is the world coming to?"

Replies are listed 'Best First'.
Re^3: Simple little regex to build a list
by merlyn (Sage) on Feb 14, 2005 at 05:37 UTC