Extract data using Reg expression extraction utility
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
09-11-18 02:56 PM
Hi I have this pattern -> (?:(?:https?|ftp|file):\/\/|www\.|ftp\.)(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$])
for extracting url from a text. The thing is I don't know ahead of time how many url's would be there in text. How will this work using utility string extract regex values?
1 REPLY 1
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-11-18 01:36 PM
Hello,
That action uses Regex.Match(). As per the documentation it will extract the first value it can find. If you'd like to get all the matches, you may
create an action using Regex.Matches(), or
you may keep calling extract regex values and removing the found matches from the string with Replace(). Please note, if a short URL is contained within a longer one, the longer one may not be found.
