Преглед изворни кода

Update cheatsheet

- removed `\p{property}`
- modified backreference help
- replaced `<` and `>` chars with escaped HTML
tags/v0.1.0^2
Garrick Aden-Buie пре 8 година
родитељ
комит
60b6a3fe5f
2 измењених фајлова са 5 додато и 5 уклоњено
  1. BIN
      R/sysdata.rda
  2. +5
    -5
      data-raw/cheatsheet.R

+ 5
- 5
data-raw/cheatsheet.R Прегледај датотеку

@@ -3,7 +3,7 @@ cheatsheet <- tibble::tribble(
"character classes", "regular", "<code>.</code>", "any character except newline",
"character classes", "regular", "<code>\\w</code> <code>\\d</code> <code>\\s</code>", "word, digit, whitespace",
"character classes", "regular", "<code>\\W</code> <code>\\D</code> <code>\\S</code>", "not word, digit, whitespace",
"character classes", "regular", "<code>\\p{property name}</code>", "matches character with unicode property, like <code>\\p{Uppercase}</code>, see <a href=\"http://www.unicode.org/reports/tr44/#Property_Index.\">unicode property list</a>.",
# "character classes", "regular", "<code>\\p{property name}</code>", "matches character with unicode property, like <code>\\p{Uppercase}</code>, see <a href=\"http://www.unicode.org/reports/tr44/#Property_Index.\">unicode property list</a>.",
"character classes", "regular", "<code>[abc]</code>", "any of a, b or c",
"character classes", "regular", "<code>[^abc]</code>", "not a, b, or c",
"character classes", "regular", "<code>[a-g]</code> <code>[1-3]</code>", "character between a & g or 1 & 3",
@@ -45,13 +45,13 @@ cheatsheet <- tibble::tribble(
"escaped characters", "control characters", "<code>\\f</code>", "form feed (<code>\\u000C</code>)",
"escaped characters", "control characters", "<code>\\0ooo</code>", "octal character where \"ooo\" is 1-3 octal digits",
"groups", NA, "<code>(abc)</code>", "capture group",
"groups", NA, "<code>\\<N></code>", "backreference to group #N, e.g. <code>\\1</code>",
"groups", NA, "<code>\\1</code>, <code>\\2</code>, <code>\\3</code> ...", "backreference to group 1, group 2, etc.",
"groups", NA, "<code>(?:abc)</code>", "non-capturing group, e.g. <code>\"gr(?:e|a)y\")</code>",
"groups", NA, "<code>(?=abc)</code>", "postive lookahead; matches are followed by <code>abc</code> (non-capturing)",
"groups", NA, "<code>(?!abc)</code>", "negative lookahead; matches are not followed by <code>abc</code> (non-capturing)",
"groups", NA, "<code>(?<=abc)</code>", "positive lookbehind; matches are preceeded by <code>abc</code> (non-capturing)",
"groups", NA, "<code>(?<!abc)</code>", "negative lookbehind; matches are not preceeded by <code>abc</code> (non-capturing)",
"groups", NA, "<code>(?>abc)</code>", "atomic-match; no back-tracking if later matches fail",
"groups", NA, "<code>(?&lt;=abc)</code>", "positive lookbehind; matches are preceeded by <code>abc</code> (non-capturing)",
"groups", NA, "<code>(?&lt;!abc)</code>", "negative lookbehind; matches are not preceeded by <code>abc</code> (non-capturing)",
"groups", NA, "<code>(?&gt;abc)</code>", "atomic-match; no back-tracking if later matches fail",
"quantifiers", NA, "<code>a*</code>", "0 or more",
"quantifiers", NA, "<code>a+</code>", "1 or more",
"quantifiers", NA, "<code>a?</code>", "0 or 1",

Loading…
Откажи
Сачувај