summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bog.el11
1 files changed, 10 insertions, 1 deletions
diff --git a/bog.el b/bog.el
index bcbbb3a..5c4cc0d 100644
--- a/bog.el
+++ b/bog.el
@@ -44,7 +44,16 @@
:group 'org)
(defcustom bog-citekey-format
- "\\b\\([a-z]+[-a-z]*\\)\\([0-9]\\{4\\}\\)\\([a-z][a-z0-9]*\\)\\b"
+ (rx
+ word-start
+ (group
+ (one-or-more lower)
+ (zero-or-more (any lower "-")))
+ (group (= 4 digit))
+ (group
+ (one-or-more lower)
+ (zero-or-more (any lower digit)))
+ word-end)
"Regular expression used to match study citekey.
By default, this matches any sequence of lower case