Two Regex Questions
- 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
Hello
I have two different regex asks (to be used in different tools of the workflow).
1. Firstly using Regex_Match, to filter out a strings which either start with a lowercase letter, or any word witin the string begins with a lowercase letter (e.g a lowercase letter after any space within the field).
2. To use Regex_Replace to remove any numbers/digits from within a string, and only leave the letters and special characters remain.
Thanks for your help in advance
Jay
Solved! Go to Solution.
- Labels:
- Regex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @jay_hl, you can use the following for the first and second cases respectively:
REGEX_CountMatches([Input], "^[a-z]|\s[a-z]", 0) = 0
REGEX_Replace([Input], "\d", "")
Just replace [Input] with your actual field of course. For the first use case, the records you want to keep will come out of the top (True) anchor and those you're disposing of will be in the bottom (False) anchor. Hope this helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks. The second works for me, but the first doesnt. I seem to get most of my records matching, but am after those that either start with a lowercase letter, or have a lowercase letter after any space.
Appreciate the support
Jay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @jay_hl
How about these expressions?
REGEX_MATCH([Text], "^[a-z].*|.*\b[a-z].*", 0)
REGEX_REPLACE([Text], "\d", "")
 
 
 
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
thanks all. appreciated
