~ubuntu-branches/ubuntu/saucy/augeas/saucy-proposed

« back to all changes in this revision

Viewing changes to lenses/rx.aug

  • Committer: Package Import Robot
  • Author(s): Raphaël Pinson
  • Date: 2013-06-15 22:36:05 UTC
  • mfrom: (1.5.3)
  • Revision ID: package-import@ubuntu.com-20130615223605-en6kj1zzaku28c57
Tags: 1.1.0-0ubuntu1
* New upstream release
* Fix download URL in debian/watch

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
 
37
37
(* Variable: space_in
38
38
   A string which not starting or ending with a space *)
39
 
let space_in  = /[^ \t\n].*[^ \t\n]|[^ \t\n]/
 
39
let space_in  = /[^ \r\t\n].*[^ \r\t\n]|[^ \t\n\r]/
40
40
 
41
41
(* Variable: no_spaces
42
42
   A string with no spaces *)
43
 
let no_spaces = /[^ \t\n]+/
 
43
let no_spaces = /[^ \t\r\n]+/
44
44
 
45
45
(* Variable: word
46
46
   An alphanumeric string *)
50
50
   One or more digits *)
51
51
let integer    = /[0-9]+/
52
52
 
53
 
(* Variable: integer
 
53
(* Variable: relinteger
54
54
   A relative <integer> *)
55
55
let relinteger = /[-+]?[0-9]+/
56
56
 
 
57
(* Variable: relinteger_noplus
 
58
   A relative <integer>, without explicit plus sign *)
 
59
let relinteger_noplus = /[-]?[0-9]+/
 
60
 
57
61
(* Variable: decimal
58
62
   A decimal value (using ',' or '.' as a separator) *)
59
63
let decimal    = /[0-9]+([.,][0-9]+)?/
62
66
   A relative <decimal> *)
63
67
let reldecimal    = /[+-]?[0-9]+([.,][0-9]+)?/
64
68
 
 
69
(* Variable: byte
 
70
  A byte (0 - 255) *)
 
71
let byte = /25[0-5]?|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9]/
 
72
 
 
73
(* Variable: hex
 
74
   A hex value *)
 
75
let hex = /0x[0-9a-fA-F]+/
 
76
 
 
77
(* Variable: octal
 
78
   An octal value *)
 
79
let octal = /0[0-7]+/
 
80
 
65
81
(* Variable: fspath
66
82
   A filesystem path *)
67
83
let fspath    = /[^ \t\n]+/
71
87
   Anything but a space, a comma or a comment sign *)
72
88
let neg1      = /[^,# \n\t]+/
73
89
 
74
 
 
75
90
(*
76
91
 * Group: IPs
77
92
 * Cf. http://blog.mes-stats.fr/2008/10/09/regex-ipv4-et-ipv6/ (in fr)
80
95
(* Variable: ipv4 *)
81
96
let ipv4 =
82
97
  let dot     = "." in
83
 
  let digits  = /(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)/ in
84
 
    digits . dot . digits . dot . digits . dot . digits
 
98
    byte . dot . byte . dot . byte . dot . byte
85
99
 
86
100
(* Variable: ipv6 *)
87
101
let ipv6 =
115
129
let ip        = ipv4 | ipv6
116
130
 
117
131
 
 
132
(* Variable: hostname
 
133
   A valid RFC 1123 hostname *)
 
134
let hostname = /(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*(
 
135
                  [A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])/
 
136
 
118
137
(*
119
138
 * Variable: device_name
120
139
 * A Linux device name like eth0 or i2c-0. Might still be too restrictive