Re: [PATCH 6/7] docs: kdoc: tighten up the pointer-to-function case

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx> writes:

> On Tue, 12 Aug 2025 13:57:47 -0600
> Jonathan Corbet <corbet@xxxxxxx> wrote:
>
>> -                r = KernRe(r'[^\(]+\(\*?\s*([\w\[\].]*)\s*\)')
>> +                r = KernRe(r'[^\(]+\(\*?\s*' r'([\w\[\].]*)' r'\s*\)')
>
> Heh, it took me a couple of seconds to understand this concat, as I haven't
> seem concat pattern like that before (maybe except for some old C book
> I read a millennium ago that I barely remember).  So, IMO, it became harder
> to understand this way. I would either remove the extra two ' r' from the
> string or write it as:
>
>                r = KernRe(r'[^\(]+\(\*?\s*' 
> 			  r'([\w\[\].]*)'
> 			  r'\s*\)')

By remove the " r" you mean glom the pieces back together into a single
string?  These long regexes are hard to make sense of, I do think it
helps to break them into logical chunks.

Certainly I can split it across multiple lines if that helps.

Thanks,

jon




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux