# Using flags in RegexReplace?

**URL:** <https://forum.novacura.com/t/using-flags-in-regexreplace/597>\
**Category:** Flow Classic\
**Tags:** studio-or-server\
**Created:** [December 21, 2023, 1:38pm UTC](https://forum.novacura.com/t/using-flags-in-regexreplace/597 "2023-12-21T13:38:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MartinL](https://avatars.discourse-cdn.com/v4/letter/m/7C9FD7/32.png) [@MartinL](https://forum.novacura.com/u/MartinL)\
**Post date:** [December 21, 2023, 1:38pm UTC](https://forum.novacura.com/t/using-flags-in-regexreplace/597/1 "2023-12-21T13:38:46Z")

</div>

I’m trying to use RegexReplace in a script step to filter out the end of a string. The problem is there are line breaks at the end of the string, and using the dotall flag (s) would solve it, but I can’t seem to use flags in flowscript. Is this not possible? Whenever I wrap my expression with slashes to add flags it stops working.

---

<div class="post-metadata">

**Author:** ![daniel](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.novacura.com/daniel/32/708_2.png) [@daniel](https://forum.novacura.com/u/daniel)\
**Post date:** [January 15, 2024, 2:18pm UTC](https://forum.novacura.com/t/using-flags-in-regexreplace/597/2 "2024-01-15T14:18:17Z")

</div>

Can you paste in some example data of original string and expected output?
