Skip to content

Instantly share code, notes, and snippets.

@floriandierickx
Last active April 6, 2019 12:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save floriandierickx/3c9e194ff881c9c91fc81648a89f4b94 to your computer and use it in GitHub Desktop.
Save floriandierickx/3c9e194ff881c9c91fc81648a89f4b94 to your computer and use it in GitHub Desktop.
citation: /^(\@\w\S+\d\d\d\d)/,
t.citation_ext = /^(\@\w\S+\d\d\d\d)/
--> gives first line, errors
strict (not working):
(\@[(A-Za-z)]+_[(A-Za-z)]+_[(0-9)]{4}?)
!! /^(( ||\[|\()\@\w\S+)( |\.|\]|\))/ (working)
!! /^(( ||\[|\()*?\@\w\S+)( |\.|\]|\))*?/ (also working, no difference)
(( ||\[|\()*\@\w\S+)( |\.|\]|\))*/ (also working, no difference)
((\ |\[|\()*\@\w\S)([^\]\s\.\,\;]*) (working)
(\@\w\S)([^\]\s\.\,\;]*) not working
(?:^|[ ;\[-])\@\w\S+([^\]\s]*) : working (captures all between[]s)
(?:^|[ ;\[-])(\@|\u0040|\uFE6B|\uFF20|\u0040)\w\S+([^\]\s]*) : identical
/^\@\w\S*/
/^@[\w]+/
Zettler: \[([^[\]]*@[^[\]]+)\]|(?=[^\\])@([a-z0-9_:.#$%&\-+?<>~/]+) : loops everything eternally
Zotxt: (?:@)[\w:\.#$%&_+?<>~/-]+
From https://github.com/notZaki/PandocCiter/issues/1:
!!! (?:^|[ ;\[-])\@([^\]\s]*) --> working online + captures citation until before ]
(?:^|[ ;\[-]*)\@([^\]\s]*) --> working online + captures citation until before ]
(?:^|[ ;\[-])\@([^\]\s\.\,\;]*) working online + captures citation until before ],;
(?:^|\s+$|[ ;\[-])\@([^\]\s\.\,\;]*) : working (identical)
(?:^|\s|\[)\@([^\]\s\.\,\;]*) : working
(?:^|\s|\[|\;)\@([^\]\s\.\,\;]*) : working
(?:^|\s|\[)[\@]([^\]\s\.\,\;]*) : working
[?:^|\s|\[][\@]([^\]\s\.\,\;]*) : working
(^|\s|\[)(\@)([^\]\s\.\,\;]*) : working
(?:^|[^ ;\[-]*)\@([^\]\s]*)--> not working
(?:[^\s;.\[-]*)\@([^\]\s]*)--> not working
\@([^\]\s]*) --> not working
(\@)([^\]\s\.\,\;]*) --> not working
\@([^\]\s.]*) --> not working
(?:^|[ ;\[-])\@\w\S+([^\]\s]*) : working (captures all between[]s)
(?:^|[ ;\[-])(\@|\u0040|\uFE6B|\uFF20|\u0040)\w\S+([^\]\s]*) : identical
(?<=^|\\s|\\[)(-?@(.*?))(?=$|[\\s\\r\\n\\]{},~#%\\\\'\"=\\(\\)]) : not working
(\\[)(-?@(.*?))(?=$|[\\s\\r\\n\\]{},~#%\\\\'\"=\\(\\)]) : not working
((@)[a-zA-Z]+)\s*(\{)\s*([^\s,]*) : not working
begin: (?<=[\\s\\r\\n\\[])@
end: (?=[\\s\\r\\n\\]])
variations:
(?<=[\\s\\r\\n\\[])\@([^\]\s]*) : not working
(\[@)([a-z]*)([1-9]*) : only captures first word
(\@|\u0040|\uFE6B|\uFF20|\u0040) --> UNICODE version of @
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment