dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #36619
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18735: update regex for sms parsing
------------------------------------------------------------
revno: 18735
committer: Long Ngo Thanh <thanhlongngo1988@xxxxxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2015-03-30 14:33:52 +0700
message:
update regex for sms parsing
modified:
dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/listener/DataValueSMSListener.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/listener/DataValueSMSListener.java'
--- dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/listener/DataValueSMSListener.java 2015-02-19 09:18:17 +0000
+++ dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/listener/DataValueSMSListener.java 2015-03-30 07:33:52 +0000
@@ -257,8 +257,8 @@
if ( !StringUtils.isBlank( smsCommand.getSeparator() ) )
{
- String x = "(\\w+)\\s*\\" + smsCommand.getSeparator().trim() + "\\s*([\\w ]+)\\s*(\\"
- + smsCommand.getSeparator().trim() + "|$)*\\s*";
+ String x = "([^\\s|" + smsCommand.getSeparator().trim() +"]+)\\s*\\" + smsCommand.getSeparator().trim() + "\\s*([\\w ]+)\\s*(\\"
+ + smsCommand.getSeparator().trim() + "|$)*\\s*";
pattern = Pattern.compile( x );
}