Advertisement
Guest User

character class vs capturing groups

a guest
Mar 2nd, 2014
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. C:\Users\Regex\Desktop\dev>pcretest -m -t
  2. PCRE version 8.34 2013-12-15
  3.  
  4. re> ~[abc]~g
  5. Compile time 0.0010 milliseconds
  6. Memory allocation (code space): 40
  7. data> abcdefghijklmnopqrstuvwxyz
  8. Execute time 0.0002 milliseconds
  9. 0: a
  10. Execute time 0.0001 milliseconds
  11. 0: b
  12. Execute time 0.0001 milliseconds
  13. 0: c
  14. Execute time 0.0013 milliseconds
  15.  
  16. C:\Users\Regex\Desktop\dev>pcretest -m -t
  17. PCRE version 8.34 2013-12-15
  18.  
  19. re> ~(a|b|c)~g
  20. Compile time 0.0015 milliseconds
  21. Memory allocation (code space): 27
  22. data> abcdefghijklmnopqrstuvwxyz
  23. Execute time 0.0003 milliseconds
  24. 0: a
  25. 1: a
  26. Execute time 0.0003 milliseconds
  27. 0: b
  28. 1: b
  29. Execute time 0.0003 milliseconds
  30. 0: c
  31. 1: c
  32. Execute time 0.0033 milliseconds
  33.  
  34. C:\Users\Regex\Desktop\dev>pcretest -d
  35. PCRE version 8.34 2013-12-15
  36.  
  37. re> ~[abc]~g
  38. ------------------------------------------------------------------
  39. 0 36 Bra
  40. 3 [a-c]
  41. 36 36 Ket
  42. 39 End
  43. ------------------------------------------------------------------
  44. Capturing subpattern count = 0
  45. No options
  46. No first char
  47. No need char
  48.  
  49. C:\Users\Regex\Desktop\dev>pcretest -d
  50. PCRE version 8.34 2013-12-15
  51.  
  52. re> ~(a|b|c)~g
  53. ------------------------------------------------------------------
  54. 0 23 Bra
  55. 3 7 CBra 1
  56. 8 a
  57. 10 5 Alt
  58. 13 b
  59. 15 5 Alt
  60. 18 c
  61. 20 17 Ket
  62. 23 23 Ket
  63. 26 End
  64. ------------------------------------------------------------------
  65. Capturing subpattern count = 1
  66. No options
  67. No first char
  68. No need char
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement