Guest User

Untitled

a guest
Apr 26th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. %r<this is a valid regexp>e.to_s
  2. # That's right.
  3.  
  4. %r(this one is valid, but...()
  5. it actually closes right here:)i.inspect
  6. # Tricky.
  7.  
  8. %r[this is valid too]x.clone
  9. # Correct.
  10.  
  11. %r.and this.i.source
  12. # Uh-huh.
  13.  
  14. %r!and
  15. this, too\!!.!
  16. # So it is.
  17.  
  18. %r|what about this?|n.kind_of?
  19. # Yep.
  20.  
  21. %r,oh my %r{goodness}\, can this one possibly be valid?!@$\#%^|\/,xi.dup
  22. # You betcha it can.
  23.  
  24. %r%ruby sure allow\%s a lot of peculiar regexps!%ou.options
  25. # Indeed it does.
  26.  
  27. %r"it's enough to #{"drive"} a syntax
  28. /highlighter/
  29. insane!
  30.  
  31. "mixixixixi.pie
  32. # I concur.
Add Comment
Please, Sign In to add comment