Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adding quick reference.

  • Loading branch information...
commit b4ad911fb70899b28ca55f281b5b82313cf510da 1 parent da2266f
@pyrat pyrat authored
Showing with 196 additions and 2 deletions.
  1. +173 −1 views/layout.haml
  2. +23 −1 views/screen.sass
View
174 views/layout.haml
@@ -9,4 +9,176 @@
%body
#container
%h1 Rubex
- = yield
+ = yield
+
+ #quickref
+ %div{ :style => "float:left" }
+
+ %h2 Quick Reference
+
+ %table
+ %tr
+ %td
+ %code
+ [abc]
+ %td
+ A single character: a, b or c
+ %tr
+ %td
+ %code
+ [^abc]
+ %td
+ Any single character
+ %em
+ but
+ a, b, or c
+ %tr
+ %td
+ %code
+ [a-z]
+ %td
+ Any single character in the range a-z
+ %tr
+ %td
+ %code
+ [a-zA-Z]
+ %td
+ Any single character in the range a-z or A-Z
+ %tr
+ %td
+ %code
+ ^
+ %td
+ Start of line
+ %tr
+ %td
+ %code
+ $
+ %td
+ End of line
+ %tr
+ %td
+ %code
+ \\A
+ %td
+ Start of string
+ %tr
+ %td
+ %code
+ \\z
+ %td
+ End of string
+ %div{ :style => "float:left" }
+ %table
+ %tr
+ %td
+ %code
+ \.
+ %td
+ Any single character
+ %tr
+ %td
+ %code
+ \\s
+ %td
+ Any whitespace character
+ %tr
+ %td
+ %code
+ \\S
+ %td
+ Any non-whitespace character
+ %tr
+ %td
+ %code
+ \\d
+ %td
+ Any digit
+ %tr
+ %td
+ %code
+ \\D
+ %td
+ Any non-digit
+ %tr
+ %td
+ %code
+ \\w
+ %td
+ Any word character (letter, number, underscore)
+ %tr
+ %td
+ %code
+ \\W
+ %td
+ Any non-word character
+ %tr
+ %td
+ %code
+ \\b
+ %td
+ Any word boundary character
+ %table
+ %tr
+ %td
+ %code
+ (...)
+ %td
+ Capture everything enclosed
+ %tr
+ %td
+ %code
+ (a|b)
+ %td
+ a or b
+ %tr
+ %td
+ %code
+ a?
+ %td
+ Zero or one of a
+ %tr
+ %td
+ %code
+ a*
+ %td
+ Zero or more of a
+ %tr
+ %td
+ %code
+ a+
+ %td
+ One or more of a
+ %tr
+ %td
+ %code
+ a{3}
+ %td
+ Exactly 3 of a
+ %tr
+ %td
+ %code
+ a{3,}
+ %td
+ 3 or more of a
+ %tr
+ %td
+ %code
+ a{3,6}
+ %td
+ Between 3 and 6 of a
+ #regex_options{ :style => "text-align:center" }
+ %p
+ options:
+ %strong
+ i
+ case insensitive;
+ %strong
+ m
+ make dot match newlines;
+ %strong
+ x
+ ignore whitespace in regex;
+ %strong
+ o
+ perform \#{...} substitutions only once
View
24 views/screen.sass
@@ -41,4 +41,26 @@ h2
:display block
#match
:background #a5a5a5
- :padding 0 4px
+ :padding 0 4px
+
+ #quickref
+ :border white 3px solid
+ :margin-top 10px
+ :padding 10px
+
+ h2
+ :color #97bf0d
+ :font-weight bold
+
+code
+ :width 100px
+ :display block
+ :font
+ :weight bold
+ :size 18px
+
+#regex_options
+ strong
+ :color red
+
+
Please sign in to comment.
Something went wrong with that request. Please try again.