Advertisement
Guest User

Untitled

a guest
Apr 19th, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.15 KB | None | 0 0
  1. 'Joe', 'June', 'Harvey' have 'Joe' == TRUE
  2.  
  3. 'Joe', 'June', 'Harvey' have 'J' == TRUE # without brackets it checks within items
  4. 'Joe', 'June', 'Harvey' have ['J'] == FALSE # with brackets to check for an item
  5.  
  6. 'Joe', 'June', 'Harvey' have 1 'J' == FALSE
  7.  
  8. 'Joe', 'June', 'Harvey' have 2 'J' == TRUE # these are
  9. 'Joe', 'June', 'Harvey' have 2 of 'J' == TRUE # equivalent
  10. 'Joe', 'June', 'Harvey' have 2 ('J') == TRUE # expressions
  11.  
  12. 'Joe', 'June', 'Harvey' have only 'Joe' == FALSE
  13.  
  14. 'Hello' have 'abc ' == FALSE
  15. 'Hello' have 'ello' == TRUE
  16. 'Hello' have any 'abcdefghijklmnopqrstuvwxyz '.split == TRUE # splits alphabet to array to check letter by letter
  17. 'Hello' have only any 'abcdefghijklmnopqrstuvwxyz '.split == TRUE
  18. 'Hello 1' have only any 'abcdefghijklmnopqrstuvwxyz '.split == FALSE
  19. 'Hello 1' have 'abcdefghijklmnopqrstuvwxyz '.split == FALSE
  20.  
  21. 1..100 have 0 == FALSE # 1..100 == array from 1 to 100
  22. 1..100 not have 0 == TRUE # equivalent
  23. 1..100 exclude 0 == TRUE # expressions
  24.  
  25. [1,2,3,4,5] have 2 of 2 == FALSE
  26. [1,1,1,2,2,2] have 2 of 2 == TRUE
  27. [1,1,1,2,2,2] have only 2 of 2 == FALSE
  28. [11, 22] have only 2 of 2 == TRUE # not sure if integers should work this way?
  29. 11, 22 have 2 of [2] == FALSE # theres no list item containing just 2
  30. 11, 22, 222 have only 1 of [22] == TRUE
  31.  
  32. [1,1,1,2,2,2] have ? > 1 of 2 == TRUE # has more than 1 of 2
  33. [1,1,1,2,2,2] have ? < 4 of 2 == TRUE # has less than 4 of 2
  34. [1,1,1,2,2,2] have ? <= 3 of 2 == TRUE # has 3 or less of 2
  35. [1,1,1,2,2,2] have ? >= 3 of 2 == TRUE # has 3 or more of 2
  36. [1,1,1,2,2,2] have ? >= 4 of 2 == FALSE # has 4 or more of 2
  37. # theres gotta be a better way to format this right?
  38.  
  39. 1, 2, 3 have 2 of 2 == FALSE # all of these
  40. [1,2,3] have 2 of 2 == FALSE # expressions are
  41. [1,2,3] have 2 of (2) == FALSE # equivalent and
  42. [1, 2, 3] have 2 (2) == FALSE # valid
  43.  
  44. [1, 2, 3] have 2 2 == ERROR # you cannnot do
  45. [1, 2, 3] have 2(2) == ERROR # integers like this
  46.  
  47. 1, 2, 3 have Integer == TRUE
  48. 1, 2, 3 have only Integer == TRUE
  49.  
  50. 'Lee', 20, 'Jon', 32 have Integer == TRUE
  51. 'Lee', 20, 'Jon', 32 have only Integer == FALSE
  52.  
  53. 'Lee', 20, 'Jon', 32 have String and Integer == TRUE # equivalent
  54. 'Lee', 20, 'Jon', 32 have String, Integer == TRUE # expressions
  55.  
  56. 'eggs', 8, 2.50 have String and Integer == TRUE
  57. 'eggs', 8, 2.50 have only String and Integer == FALSE # contains a float
  58. 'eggs', 8, 2.50 have String, Integer, Float == TRUE
  59. 'eggs', 8, 2 have String, Integer, Float == FALSE
  60.  
  61. 'Charlie Brown' have Integer == FALSE
  62. 'Charlie Brown, 1960' have Integer == FALSE # strings cannot contain integers
  63. ['Charlie Brown', 1960] have Integer == TRUE # the array contains an Int
  64. 'Charlie Brown, 1960' have Number == TRUE # 'Number' is numeric substring
  65.  
  66. '1A 2B 3C' have Number == TRUE
  67. '1A 2B 3C' have only Number == FALSE
  68. '123' have only Number == TRUE
  69.  
  70. '11 22 33' have only Number or ' ' == TRUE
  71. '11, 22, 33' have only Number or ' ' == FALSE
  72. '11, 22, 33' have Number or ' ' == TRUE # equivalent
  73. '11, 22, 33' have any Number, ' ' == TRUE # expressions
  74. '11, 22, 33' have Number, ' ' == TRUE
  75.  
  76. '11bb' have only Number or 'aa' == FALSE
  77. '11bb' have Number or 'aa' == TRUE
  78. 'aabb' have Number or 'aa' == TRUE
  79. 'aabb' have Number and 'aa' == FALSE
  80.  
  81. # example of comparing to variables that are assigned 'haveable' values
  82. Alphabet = 'abcdefghijklmnopqrstuvwxyz'.split
  83. 'eggs and ham' have only any Number, Alphabet, ' ' == TRUE
  84.  
  85. AlphaNumeric = Number or Alphabet or ' '
  86. 'eggs and ham' have only AlphaNumeric == TRUE # AlphaNum & Alphabet would likely be built in
  87.  
  88.  
  89. 'foobar' have 'a','b','c' == FALSE # equivalent
  90. 'foobar' have 'a' and 'b' and 'c' == FALSE # expressions
  91.  
  92. 'foobar' have any 'a','b','c' == TRUE # equivalent
  93. 'foobar' have 'a' or 'b' or 'c' == TRUE # expressions
  94.  
  95. 'foobar' have 'a' and 'b' or 'c' == TRUE
  96. 'foobar' have 'a' or 'b' and 'c' == FALSE
  97.  
  98. 'foobar' have 'a', 'b' == TRUE
  99. 'foobar' have 'a' or 'b' == TRUE
  100. 'foobar' have 'a' and 'b' == TRUE
  101.  
  102. 'foobar' have 'a' or 'c' == TRUE # these are
  103. 'foobar' have any 'a', 'c' == TRUE # equivalent
  104. 'foobar' have any 'ac'.split == TRUE # expressions
  105.  
  106. 'foobar' have 'a' and 'c' == FALSE # these are
  107. 'foobar' have 'a', 'c' == FALSE # equivalent
  108. 'foobar' have 'ac'.split == FALSE # expressions
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement