[gnome-terminal] regex: Add a comment explaining APOS_START_DEF
- From: Egmont Koblinger <egmontkob src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-terminal] regex: Add a comment explaining APOS_START_DEF
- Date: Wed, 26 Feb 2020 17:57:33 +0000 (UTC)
commit bbb96c77e9b45c0d6745386a48196fa6b997a38e
Author: Egmont Koblinger <egmont gmail com>
Date: Wed Feb 26 18:45:37 2020 +0100
regex: Add a comment explaining APOS_START_DEF
src/terminal-regex.h | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/terminal-regex.h b/src/terminal-regex.h
index 3a3e89a6..118cf9fc 100644
--- a/src/terminal-regex.h
+++ b/src/terminal-regex.h
@@ -43,7 +43,11 @@
#ifndef TERMINAL_REGEX_H
#define TERMINAL_REGEX_H
-/* Lookbehind to see if there's a preceding apostrophe */
+/* Lookbehind to see if there's a preceding apostrophe.
+ * Unlike the other *_DEF macros which define regex subroutines,
+ * this one is a named capture that defines APOS_START to either
+ * an apostrophe or the empty string, depending on the character
+ * preceding this APOS_START_DEF construct. */
#define APOS_START_DEF "(?<APOS_START>(?<='))?"
#define SCHEME "(?ix: news | telnet | nntp | https? | ftps? | sftp | webcal )"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]