Quantcast
Viewing all articles
Browse latest Browse all 13053

Regex expression help!

I used regex (?i)Area>(?P<Message>[^<]+) to extract the whole field below.

Originally <d:Message>(22/7)17:53 Accident on AYE (towards Tuas) after Jurong Port Rd Exit. Avoid lanes 2 and 3.</d:Message>

How can I extract only starting from the word after (Jurong Port Rd Exit) till the word Exit ? The data is updated daily on every 5 minutes interval. Thanks if you guys can help ! =)

More of my XML is at here Xml Data (Only need to extract accident event)

This picture is search by Type="Accident".

Image may be NSFW.
Clik here to view.
alt text

I have total 6 Types.

Image may be NSFW.
Clik here to view.
alt text

After using the | rex ")s(?<message>.*Exit|[^.]+)" | dedup Message , there are still duplication of: (Note on after Buona Vista Exit after Buona Vista Exit with congestion till Buona Vista Exit after Buona Vista Exit with congestion till Clementi Ave 2 Exit after Buona Vista Exit with congestion till Clementi Ave 6 Exit after Buona Vista Exit with congestion till Jurong Town Hall Exit) is all the same accident at Buona Vista Exit.

Image may be NSFW.
Clik here to view.
alt text


Viewing all articles
Browse latest Browse all 13053

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>