# Problems to parse "/" character

**URL:** <https://discuss.elastic.co/t/problems-to-parse-character/117615>\
**Category:** Logstash\
**Created:** [January 30, 2018, 12:34pm UTC](https://discuss.elastic.co/t/problems-to-parse-character/117615 "2018-01-30T12:34:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lucasbiccio](https://avatars.discourse-cdn.com/v4/letter/l/f4b2a3/32.png) [@lucasbiccio](https://discuss.elastic.co/u/lucasbiccio)\
**Post date:** [January 30, 2018, 12:34pm UTC](https://discuss.elastic.co/t/problems-to-parse-character/117615/1 "2018-01-30T12:34:19Z")

</div>

Hi all,

I'm using logstash to parse a FIX string message into a index data tag by tag. Check the following configuration:

```
if "fix" in [tags]
{
	grok 
	{
		match => { "message" => "%{GREEDYDATA:direction} %{GREEDYDATA:timestamp} %{GREEDYDATA:fix_string}" }
	}
	kv 
	{
		source => "fix_string"
		field_split => "\x01"
	}
}

```

The filter is working properly, except when we have a text with a "/" inside the message.  
For the example below, logstash is considering the content util "/" as the direction attribute, but it belows o the fix\_string attribute.

```
IN 20180130-11:45:29.924351900 8=FIX.4.49=51935=834=15852=20180130-11:41:59.0631=9999316=014=032=037=NONE38=539=840=244=8490054=258=Short position [1.00] exceeds limit [0.00] for Equivalent Instrument / [ID(50885),SIDE(2),RATIO(1.00)]59=060=20180130-11:41:59103=10020150=8151=5453=4448=6074660447=D452=36447=D452=54448=85447=D452=7447=D452=3310=077

```

Does anybody have and idea to solve this issue?

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [January 30, 2018, 12:55pm UTC](https://discuss.elastic.co/t/problems-to-parse-character/117615/2 "2018-01-30T12:55:33Z")

</div>

Don't use more than one DATA or GREEDYDATA pattern in the same expression. It's very inefficient and can lead to unexpected matches, possibly including this one. Use a more exact expression like for example `%{NOTSPACE} %{NOTSPACE} %{GREEDYDATA}`.

---

<div class="post-metadata">

**Author:** ![lucasbiccio](https://avatars.discourse-cdn.com/v4/letter/l/f4b2a3/32.png) [@lucasbiccio](https://discuss.elastic.co/u/lucasbiccio)\
**Post date:** [January 30, 2018, 5:09pm UTC](https://discuss.elastic.co/t/problems-to-parse-character/117615/3 "2018-01-30T17:09:33Z")

</div>

Fit like a glove!  
Thank you very much for your assistance.  
Regards,

Biccio

---

<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:** [February 27, 2018, 5:09pm UTC](https://discuss.elastic.co/t/problems-to-parse-character/117615/4 "2018-02-27T17:09:58Z")

</div>

Closed on February 27, 2018, 5:09pm UTC

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