Re: [PATCH v2 4/4] diff.c: convert builtin funcname patterns to non-GNU extended regex syntax

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

 



Brandon Casey wrote:

> +	{ "java", "!^[ 	]*(catch|do|for|if|instanceof|"
> +			"new|return|switch|throw|while)\n"
> +			"^[ 	]*(([ 	]*"
> +			"[A-Za-z_][A-Za-z_0-9]*){2,}"

I don't understand the last two lines above.

Is it possible for the second bracketed space and tab to match
anything? Wouldn't the first one consume all space and tab?

Assuming it is possible for the second brackets to match
successfully, why would we want to capture this leading
space?

It looks like both of the following lines would match:

   ' a'
   'ab'

but not this

    'a'

Would it be better written like:

"^[ 	]*(([A-Za-z_][A-Za-z_0-9]*)"

> +			"[ 	]*\\([^;]*)$", REG_EXTENDED },

<snip>


-brandon

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux