Re: Regular expression in varaible

2005-09-22 Thread Jeff 'japhy' Pinyan
On Sep 22, Michael Gale said: Jeff 'japhy' Pinyan wrote: On Sep 22, Michael Gale said: I have the following line of code and I believe it is correct, but it is not doing what I am expecting it to do: Config file [test] value=^OK$i The problem is that '^OK$i' as a string turned into a reg

Re: Regular expression in varaible

2005-09-22 Thread Michael Gale
I was hoping that $ would mean the end of the string and "i" would mean case insensitive :( Michael Jeff 'japhy' Pinyan wrote: On Sep 22, Michael Gale said: I have the following line of code and I believe it is correct, but it is not doing what I am expecting it to do: Config file [tes

Re: Regular expression in varaible

2005-09-22 Thread Jeff 'japhy' Pinyan
On Sep 22, Michael Gale said: I have the following line of code and I believe it is correct, but it is not doing what I am expecting it to do: Config file [test] value=^OK$i The problem is that '^OK$i' as a string turned into a regex is a regex that can never match. The '$' is the end-of-s

Regular expression in varaible

2005-09-22 Thread Michael Gale
Hello, I have the following line of code and I believe it is correct, but it is not doing what I am expecting it to do: Config file [test] value=^OK$i $regex=$Config->get('test.value'); chomp ($regex); $regex=qr/$regex/;