Commit 6f10616
committed
Rewrite the mac address regexing
- there's no need for the beginning/end match (that's implied as far as I can tell)
- drop some unnecessary groups
- use non-capturing groups since we're just looking for a match
- as a consequence this can be constructed with String.join
- add a few more tests1 parent 5dda98d commit 6f10616
File tree
2 files changed
+12
-10
lines changed- modules/ingest-common/src
- main/java/org/elasticsearch/ingest/common
- test/java/org/elasticsearch/ingest/common
2 files changed
+12
-10
lines changedLines changed: 7 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
| |||
69 | 68 | | |
70 | 69 | | |
71 | 70 | | |
72 | | - | |
| 71 | + | |
| 72 | + | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | | - | |
81 | | - | |
| 80 | + | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| |||
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
970 | 970 | | |
971 | 971 | | |
972 | 972 | | |
973 | | - | |
| 973 | + | |
974 | 974 | | |
975 | | - | |
976 | | - | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
977 | 979 | | |
978 | 980 | | |
979 | 981 | | |
| |||
0 commit comments