# How do I match URL

**URL:** <https://discuss.elastic.co/t/how-do-i-match-url/125984>\
**Category:** Logstash\
**Created:** [March 28, 2018, 6:25pm UTC](https://discuss.elastic.co/t/how-do-i-match-url/125984 "2018-03-28T18:25:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Blason](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/blason/32/42284_2.png) [@Blason](https://discuss.elastic.co/u/Blason)\
**Post date:** [March 28, 2018, 6:25pm UTC](https://discuss.elastic.co/t/how-do-i-match-url/125984/1 "2018-03-28T18:25:50Z")

</div>

Hi Team,

How do I match URL from below pattern? As well as how do I exclude " and ,.

Here I am starting..

"1078","[http://www.innovationsystems.gr/RDFdk/","offline","malware\_download","emotet,heodo,exe](http://www.innovationsystems.gr/RDFdk/%22,%22offline%22,%22malware_download%22,%22emotet,heodo,exe)"

"%{INT:ID}","%{WORD:URL}

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [March 28, 2018, 6:35pm UTC](https://discuss.elastic.co/t/how-do-i-match-url/125984/2 "2018-03-28T18:35:10Z")

</div>

I would start with something like

```auto
  csv { }
  grok { match => { "column2" => "%{URIPROTO:uri_proto}://(?:%{USER:user}(?::[^@]*)?@)?(?:%{URIHOST:uri_domain})?(?:%{URIPATHPARAM:uri_param})?" } }

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 25, 2018, 6:35pm UTC](https://discuss.elastic.co/t/how-do-i-match-url/125984/3 "2018-04-25T18:35:21Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
