I created a BT with a splitting measure to capture email information. I am able to capture email but @ symbol is missing in all of the splittings.
Below is my regex
My sample output:-
Solved! Go to Solution.
The issue is that the @ is not included in any capturing groups (between parentheses). There's probably a few ways to fix it but in general you'll need to include the '@' within a group. Either add some additional parentheses around the leading and trailing parentheses already there or just surround the '@' with it's own set of parentheses. This link shows the former and you can see it is included in a capture group:
I am trying different ways but still @ is not capturing for some reason.
\A((?:[\w+\-].?)+)(@)([a-z\d\-]+(?:\.[a-z]+)*\.[a-z]+)\z but no luck. In regex101.com it is showing completely valid for any email id's but in client it is not taking this symbol.
Did you try the suggestion I included in that link:
Apart from that I don't really have any more suggestions. Normally I'll just play with a couple variations until it works - I only have a working understanding of the details of regex. I can say for common use cases like this (matching an email) I would expect to find quite a few from a search online.
No need to use such horrendous regular expressions. As you are not validating regular expression but just capturing text. Use the boundaries of the fields than pattern.
Note: Regex put dtserver under strain, some may even cause lag in the purepath processing.