# Parse Unstructured Log Content While Skipping Newlines Using DQL

**URL:** <https://community.dynatrace.com/t/parse-unstructured-log-content-while-skipping-newlines-using-dql/52487>\
**Category:** DQL\
**Tags:** dql, log-monitoring-class, parse, logs\
**Created:** [July 15, 2025, 2:40pm UTC](https://community.dynatrace.com/t/parse-unstructured-log-content-while-skipping-newlines-using-dql/52487 "2025-07-15T14:40:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mpundang](https://avatars.discourse-cdn.com/v4/letter/m/85f322/32.png) [@mpundang](https://community.dynatrace.com/u/mpundang)\
**Post date:** [July 15, 2025, 2:40pm UTC](https://community.dynatrace.com/t/parse-unstructured-log-content-while-skipping-newlines-using-dql/52487/1 "2025-07-15T14:40:47Z")

</div>

Hi everyone, I have this log format in a Managed Cluster, with Log Classic, no Grail:

```markup
"content": "last access : Wed May 22 11:32:42 ART 2025\\nmax inactive interval : 1800\\nuser name : anonymous\\nvalid session : true\\nnew session : false\\noverflowed : false\\n _refCount=1\\n } \\n _httpSessionContext=com.ibm.ws.session.http.HttpSessionContextImpl@115c1a4a\\n } \\n)\\nc5uZNCXLKmuKjacR5_NNqxK 28/05/25 11:32:50,936 DEBUG script.dao.GeneralDAOImpl findRow(sp_FN_Comprobantes_FNC,{54672,1,50150346002250506,39,})\\nULL1lryN-ZidhtxVbFg09WN 28/05/25 11:32:50,936 DEBUG sam.service.SamSPService <<<< TM_FEMP_DB2. - RESULTADOS: cursor -> 1 items retornados, P_COD_CLASEORD = TXO, P_COD_CLIECASH = 0026008500002886, p_sqlcode_out = null, P_COD_IDORDEN = 5751BOJN, \\nc5uZNCXLKmuKjacR5_NNqxK 28/05/25 11:32:50,936 INFO script.dao.GeneralDAOImpl \\nc5uZNCXLKmuKjacR5_NNqxK 28/05/25 11:32:50,938 INFO script.dao.GeneralDAOImpl exec sp_FN_Comprobantes_FNC 54672, null, '50150346002250506', '39', null, null, null\\nc5uZNCXLKmuKjacR5_NNqxK 28/05/25 11:32:50,938 INFO script.dao.GeneralDAOImpl ",

```

I need to get the&nbsp; keyvalue string:&nbsp;_c5uZNCXLKmuKjacR5\_NNqxK_ (23 letters).

The keyvalue appears on multiple lines in the log, and there are even other keys with the same string length that I need to capture. It’s always a 23-character string.

I can check after /n (newline) begins with the keyvalue but I cannot get the value with this filter:

```markup
PARSE(content, "LD '\n' DATA [a-zA-Z0-9_-]{23}:test")

```

Does anybody knows what is the correct filter to get the keyvalue? and is it possible to get multiple keyvalues from this content log?

Regards!

---

<div class="post-metadata">

**Author:** ![DanielS](https://avatars.discourse-cdn.com/v4/letter/d/3ab097/32.png) [@DanielS](https://community.dynatrace.com/u/DanielS)\
**Post date:** [July 15, 2025, 11:06pm UTC](https://community.dynatrace.com/t/parse-unstructured-log-content-while-skipping-newlines-using-dql/52487/2 "2025-07-15T23:06:53Z")

</div>

Hello&nbsp;[@mpundang](https://community.dynatrace.com/user/82282)&nbsp;a tought one.

```markup
n\K[a-zA-Z0-9_-]{23}

```

 ![DanielS_0-1752620569998.png](https://global.discourse-cdn.com/dynatrace/original/3X/6/8/68ba1e1950120204dfd2e0ec74c2b3c2f70cc011.png)

or another option, less elegant

```markup
[^\n]+([a-zA-Z0-9_-]{23})

```

 ![DanielS_1-1752620706097.png](https://global.discourse-cdn.com/dynatrace/original/3X/e/2/e209be4e6440d315a3467352afedab41ea7c101f.png)
