Robert Klemme
4/17/2007 2:39:00 PM
On 17.04.2007 16:08, Guest wrote:
> I have a line such as:
>
> #define BLAH 10
>
> or
>
> #include "BLAH.h"
>
> and I'm going around in circles trying to just get the 'include' or
> 'define' bit...anyone can help me?
>> ["#define BLAH 10", '#include "BLAH.h"'].map {|s| s[/^#(\w+)/, 1]}
=> ["define", "include"]
HTH
robert