# Replace string with multiple patterns on ingest node

**URL:** <https://discuss.elastic.co/t/replace-string-with-multiple-patterns-on-ingest-node/216039>\
**Category:** Elasticsearch\
**Created:** [January 22, 2020, 10:45am UTC](https://discuss.elastic.co/t/replace-string-with-multiple-patterns-on-ingest-node/216039 "2020-01-22T10:45:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AndresL](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andresl/32/54070_2.png) [@AndresL](https://discuss.elastic.co/u/AndresL)\
**Post date:** [January 22, 2020, 10:45am UTC](https://discuss.elastic.co/t/replace-string-with-multiple-patterns-on-ingest-node/216039/1 "2020-01-22T10:45:45Z")

</div>

Hi,  
i have certain numbers in format xxxx-xxxx or format xxxxxxxx that i want to replace on the ingest-node. i will also like to verify if the message contains some credit card info.

It seems i cant use multiple gsubs

---

<div class="post-metadata">

**Author:** ![Fabio-sama](https://avatars.discourse-cdn.com/v4/letter/f/b9e5f3/32.png) [@Fabio-sama](https://discuss.elastic.co/u/Fabio-sama)\
**Post date:** [January 22, 2020, 11:28am UTC](https://discuss.elastic.co/t/replace-string-with-multiple-patterns-on-ingest-node/216039/2 "2020-01-22T11:28:34Z")

</div>

Use a script processor. Can you share here a sample of input doc and what would be your desired output?

Thanks

---

<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 19, 2020, 11:28am UTC](https://discuss.elastic.co/t/replace-string-with-multiple-patterns-on-ingest-node/216039/3 "2020-02-19T11:28:34Z")

</div>

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