# Cannot input log with regular expression

**URL:** <https://discuss.elastic.co/t/cannot-input-log-with-regular-expression/31946>\
**Category:** Logstash\
**Created:** [October 10, 2015, 1:37am UTC](https://discuss.elastic.co/t/cannot-input-log-with-regular-expression/31946 "2015-10-10T01:37:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![M.Tyler](https://avatars.discourse-cdn.com/v4/letter/m/94ad74/32.png) [@M.Tyler](https://discuss.elastic.co/u/M.Tyler)\
**Post date:** [October 10, 2015, 1:37am UTC](https://discuss.elastic.co/t/cannot-input-log-with-regular-expression/31946/1 "2015-10-10T01:37:03Z")

</div>

Please let me question about regular expression for logstash

Logstash version:1.5.4

I'd like to input MPLog-xxxxxxxx-xxxxxx.log that is log of Windows Defender.  
(There is C:\ProgramData\Microsoft\Windows Defender\Support\MPLog-xxxxxxxx-xxxxxx.log)

- xxx is random number.

So I configured logstash.conf as the below.

----- @ logstash.conf -----  
input {  
file {  
path =\> "C:\ProgramData\Microsoft\Windows Defender\Support\*.log"  
}  
}  
----- @ logstash.conf -----

But logstash cannot input the log using regular expression although logstash can input if it don't use regular expression.

Could you tell me solution ?

Best regards,  
Tyler

---

<div class="post-metadata">

**Author:** ![shaunak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shaunak/32/6643_2.png) [@shaunak](https://discuss.elastic.co/u/shaunak)\
**Post date:** [October 10, 2015, 7:12pm UTC](https://discuss.elastic.co/t/cannot-input-log-with-regular-expression/31946/2 "2015-10-10T19:12:50Z")

</div>

Try changing your path separator from \ to /.

---

<div class="post-metadata">

**Author:** ![M.Tyler](https://avatars.discourse-cdn.com/v4/letter/m/94ad74/32.png) [@M.Tyler](https://discuss.elastic.co/u/M.Tyler)\
**Post date:** [October 11, 2015, 6:25am UTC](https://discuss.elastic.co/t/cannot-input-log-with-regular-expression/31946/3 "2015-10-11T06:25:57Z")

</div>

Hi Shaunak,

Thank you for your answer !

I could collect the log.

Thanks,

Tyler

---

<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:** [July 6, 2017, 5:26am UTC](https://discuss.elastic.co/t/cannot-input-log-with-regular-expression/31946/4 "2017-07-06T05:26:55Z")

</div>


