Search code examples
regexwso2complex-event-processing

Text Event Builder Regex not working


I am new to WSO2 CEP tool. My input comes from JMS message in the below format

Latitude=77.77, Longitude=70.12
Latitude=70.12, Longitude60.13
Latitude=xx.xx, Longitude=xx.xx
-
-
-

How do I formulate a regex to extract the values for latitude and longitude into individual fields. I tried ^Latitude=in,

But in the system log I am getting the below error [2014-02-13 20:33:57,158] ERROR - {NativeWorkerPool} Uncaught exception java.lang.IllegalStateException: No match found

Can someone help me please

Regards Subbu


Solution

  • if a single line contains:

    latitude=20.21, longitude=21.20
    

    the regex pattern should be

    "(\d)+\.(\d)+"
    

    to return 2 values, 20.21 and 21.20