# Create custom pattern for specific name

**URL:** <https://discuss.elastic.co/t/create-custom-pattern-for-specific-name/151891>\
**Category:** Logstash\
**Created:** [October 10, 2018, 4:08pm UTC](https://discuss.elastic.co/t/create-custom-pattern-for-specific-name/151891 "2018-10-10T16:08:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bab](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bab/32/86201_2.png) [@bab](https://discuss.elastic.co/u/bab)\
**Post date:** [October 10, 2018, 4:08pm UTC](https://discuss.elastic.co/t/create-custom-pattern-for-specific-name/151891/1 "2018-10-10T16:08:04Z")

</div>

Hello all.

i have a problem i can't parse a specific name `principal name: tu02612` from my log-entry,  
i trid this costum pattern `[\s principal name:](?<bensl_name>[a-z0-9]{5,7})[\s]` but i didn't get any thing right.  
some thing like this:

```
{
  "bensl_name": [
    [
      "tainer"
    ]
  ]
}

```

my log file looks like this:

```
17/18 18:23:52:414 CEST] 000000e7 SystemOut O 1116543205 [WebContainer : 19] ERROR filenet_error.engine.com.filenet.apiimpl.transport.RequestBroker - method name: checkNameCollision principal name: tu02612 Global Transaction: true User Transaction: false Exception Info: A uniqueness requirement has been violated. The value for property FolderName of class Folder is not unique.
com.filenet.api.exception.EngineRuntimeException: FNRCE0043E: E_NOT_UNIQUE: A uniqueness requirement has been violated. The value for property FolderName of class Folder is not unique. failedBatchItem=0
	at com.filenet.engine.persist.FolderPersister.checkNameCollision(FolderPersister.java:442)
	at com.filenet.engine.persist.FolderPersister.handleException(FolderPersister.java:246)

```

i m not able to parse just the content of principal name: `tu02612` in the bensl\_name field. Can any one help!!!

---

<div class="post-metadata">

**Author:** ![Makra](https://avatars.discourse-cdn.com/v4/letter/m/8491ac/32.png) [@Makra](https://discuss.elastic.co/u/Makra)\
**Post date:** [October 10, 2018, 4:52pm UTC](https://discuss.elastic.co/t/create-custom-pattern-for-specific-name/151891/2 "2018-10-10T16:52:13Z")

</div>

> [@bab](#):
>
> bensl\_name

What about `%{GREEDYDATA} principal name: %{WORD:bensl_name}` ?

---

<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:** [November 7, 2018, 4:52pm UTC](https://discuss.elastic.co/t/create-custom-pattern-for-specific-name/151891/3 "2018-11-07T16:52:14Z")

</div>

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