Regex question
- 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
Hi,
I am still learning regex and I would kindly ask the community for help.
Can someone provide me with information on how wright regex that will remove | (vertical dash) as the last sign?
Usually I have more then one so it should remove one or more of them but only if vertically dash is the last character.
Input
ABC|||||
Expected output:
ABC
I also have
ABC|ABD||||
Expected output:
ABC|ABD
I hope that makes sense 🙂
Solved! Go to Solution.
- Labels:
- Regex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @Emil_Kos
Regex isn't the only way to deal with strings. Try
TrimRight([Field1],"|")
Simple and elegant
Dan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I'm planning on giving a presentation at our local user group about RegEx versus alternatives and this is exactly the kind of thing I am trying to focus on. I have fallen in love with Regular Expressions, but I always want to use the best tool for the job. Great stuff, love it.
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @mpennington,
This sounds really interesting. If I could also participate in it please keep me in mind 😁
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Absolutely. I am one of the leaders of the Kansas City User Group and I will be happy to follow up once we get it on the calendar. My expectation is that it will be between the 7th and 10th of April, but not positive. Virtual meeting, so happy to welcome all who are interested.
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @mpennington,
I joined the Kansas city user group to get notification about the event 😀

- « Previous
-
- 1
- 2
- Next »