Hi –
I was hoping for some help using ExtractString in a calculated member or if there is a better approach to what I am trying to accomplish.
For background, we have a system that finds copyright infringements and creates JIRA tickets. Within that ticket we consolidate all of the matches and include that in the JIRA description similar to below.
Site Searched: SomeSite
Keywords: OurCompany, lineman
Found violations: 3
Infringement Letter: N:\Curriculum\Copyright\Infringement\Infringement Letters\Infringement letters\SomeSite\Infringement Copyright Letter SomeSite_06_18_2019_mjf
Response Email located:
N:\Curriculum\Copyright\Infringement\Infringement Letters\Infringement letters\Reponses\06_18_19_RE DMCA Notice of Copyright Infringement
Item Code: T251LM.K1
Submitter: The Real J. Evans
Submitted Date: 8/2/17
URL Title: OurCompany Test 2
Installer/Tech Job Information, Level I – 2nd Ed., Lesson 1
[Violating URL: https://www.SomeSite.com/?src_url=https://www.SomeSite.com/#flashcard/view/19827671](https://www.studyblue.com/?src_url=https://www.studyblue.com/#flashcard/view/19827671)
Item Code: J221LM.M1
Submitter: The Real J. Evans
Submitted Date: 8/2/17
URL Title: OurCompany Test 3
Job Information 1, Level I – 2017 Ed., Lesson 10
[Violating URL: ](https://www.studyblue.com/?src_url=https://www.studyblue.com/#flashcard/view/19827671)[https://www.SomeSite.com/?src_url=https://www.SomeSite.com/#flashcard/view/19827673](https://www.studyblue.com/?src_url=https://www.studyblue.com/#flashcard/view/19827673)
Item Code: OA2-1LM
Submitter: The Real J. Evans
Submitted Date: 8/2/17
URL Title: OurCompany Test 2-1
Outside 2nd Year, Level 1, Lesson 2
[Violating URL: ](https://www.studyblue.com/?src_url=https://www.studyblue.com/#flashcard/view/19827671)[https://www.SomeSite.com/?src_url=https://www.SomeSite.com/#flashcard/view/19827549](https://www.studyblue.com/?src_url=https://www.studyblue.com/#flashcard/view/19827549)
We then import the Description field into EazyBI.
The issue I am having is that I want to pull out all of the matches for Violating URL’s for each ticket from that description in a calculated measure.
I am using " (?=Violating URL: ).*?(?=$)” for my regular expression which works fine on the rex101 test site (https://regex101.com/r/Ba2f5Z/1) and returns 3 matches.
However, the ExtractString function in my calculated member below is only returning the first match.
ExtractString([Measures].[Issue Description Snippet]," (?=Violating URL: ).*?(?=$)”)
I am guessing that since ExtractString returns a String that I am never going to get more than the first match.
Is there a better way to approach what I am trying to do?