Re: [squid-users] External ACL Auth & Session DB for 100+ clients behind NAT

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Fri, 01 Jun 2012 21:12:24 +1200

On 31/05/2012 3:40 a.m., Nishant Sharma wrote:
> On Sun, May 27, 2012 at 5:28 PM, Amos Jeffries wrote:
>>> If you could send in sample strings - received and final expected
>>> result, I can help with hacking Perl code.
>> Thank you. Expected input is strings like:
>>
>> "1 foo bar" -> channel-ID="1", UUID="foo bar"
>> "2 hello" -> channel-ID="2", UUID="hello"
>>
>> Only numerics in the channel-ID, followed by one SP to separate them, then
>> anything including more SP characters in the UUID portion.
>>
> my $string = "1 foo bar";
> $string =~ m/^(\d+)\s(.*)$/;
> my ($cid, $uuid) = ($1, $2);
>
> Above code will give values for $cid and $uuid as:
>
> $cid = 1
> $uuid = "foo bar"
>
> Let me know if that's as expected.

Thank you. Works perfectly.

Amos
Received on Fri Jun 01 2012 - 09:12:40 MDT

This archive was generated by hypermail 2.2.0 : Fri Jun 01 2012 - 12:00:06 MDT