Regex to pull a string between a comma
- 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'm not sure what I'm missing in this formula as I just wanted to pull the street name only, not including the "suite" part. Could you please look into this? Thank you !
Solved! Go to Solution.
- Labels:
- Regex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @Wynn ,
The only thing missing is the comma as a delimiter of your regular expression. Example attached.
([^\d]+)?,
Best,
Fernando Vizcaino
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @Wynn
You can try to add a comma and .+ outside of the parenthesis
I'd also add ? inside the closing parenthesis so it's not greedy and stops at the first comma.
So, ?),.+
Cheers!
Esther
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
One more idea. You can do this without RegEx too. Use Text to Columns, using a comma as the delimiter, and separating into 2 columns. Drop the second parsed column with a select tool. Then use Data Cleansing to remove the number from the address field, which will leave you with the street only.
Cheers!
Esther
