Regex replace is truncating string at the end
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I am new to Regex. My input string in Text Input Tool is "Ha HaHa". I am using Regex replace to replace \bHa with "Bar". Case insensitivity check is also on. What I expect it to show in output is "Bar BarHa" as \b would identify the word boundary so \bHa would replace only first two "Ha". The output that I am getting is "Bar BarH". Could anyone please explain where I am going wrong and what is actually happening here?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @GJNom
This could a possibility that this a data type size issue which is truncating your string. Try using select tool and increasing the string size.
I tried same regex as yours and it working for me.
Hope this helps 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
And thank you sharing the usage of \b. Its the first time i am coming across it. It has a great usage 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks @atcodedog05 . It was indeed the data type size issue. I increased the size and it worked. 🖖
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
No problem. I am glad that you got to know about it through me. Sharing is caring! Enjoy its usage. 🤝