aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/helper/PatternBuilder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-10-25 21:00:19 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-10-25 21:00:19 +1300
commitdb08f36b51f7f51e901cc778a79ba8949c1d6d08 (patch)
treeb39e8d0a51cd266d498271b344b2ff99f0404967 /src/org/traccar/helper/PatternBuilder.java
parent78f7e386fe4fb46fc0c9295853a2467408330dfd (diff)
downloadtrackermap-server-db08f36b51f7f51e901cc778a79ba8949c1d6d08.tar.gz
trackermap-server-db08f36b51f7f51e901cc778a79ba8949c1d6d08.tar.bz2
trackermap-server-db08f36b51f7f51e901cc778a79ba8949c1d6d08.zip
Refactor Meiligao protocol decoder
Diffstat (limited to 'src/org/traccar/helper/PatternBuilder.java')
-rw-r--r--src/org/traccar/helper/PatternBuilder.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/org/traccar/helper/PatternBuilder.java b/src/org/traccar/helper/PatternBuilder.java
index 4ce4295dd..6742e7130 100644
--- a/src/org/traccar/helper/PatternBuilder.java
+++ b/src/org/traccar/helper/PatternBuilder.java
@@ -49,7 +49,7 @@ public class PatternBuilder {
s = s.replace("xxxx", "x{4}").replace("xxx", "x{3}").replace("xx", "x{2}");
s = s.replace("d", "\\d").replace("x", "\\p{XDigit}").replaceAll("([\\.])", "\\\\$1");
- s = s.replaceAll("\\|$", "\\\\|"); // special case for delimiter
+ s = s.replaceAll("\\|$", "\\\\|").replaceAll("^\\|", "\\\\|"); // special case for delimiter
fragments.add(s);
return this;