Reg Exp problem

2001-08-08 Thread Dianne Van Dulken
Hi All, I am having a little trouble with a regexp and I was hoping I might get a hint towards a module or something like that. I get a query string passed to me, that I need to record in a database. A typical one might look like this: %3Cdel_phone%3E%28020%200202%2000202%3C/del_phone%3E

Re: Reg Exp problem

2001-08-08 Thread Michael Kelly
On 8/8/01 7:08 PM, Dianne Van Dulken wrote: Hi All, I am having a little trouble with a regexp and I was hoping I might get a hint towards a module or something like that. I get a query string passed to me, that I need to record in a database. A typical one might look like this:

RE: Reg Exp problem

2001-08-08 Thread Dianne Van Dulken
snippy From your example, it appears that you simply need to parse a URL-encoded string. For that, you could use this regex, which uses the chr and hex functions to translate URL-encoded characters: $string =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg; Is this better than $string =~

RE: Reg Exp problem

2001-08-08 Thread Dianne Van Dulken
I've got this working nicely now. The data was being called by ENV('QUERY_STRING'), which was causing most of the troubles. Thank you very much to Michael and Bradley for their help Cheers Di -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]