rbross wroteUsers do their best to separate Notices by ** at the end of each notice.
@[deleted]
From the above, I assume this is an ongoing way of date entry.
Here is my solution and I would like to hear what others think of it.
BO1.MultiNotices contain the data like from the OPs post: **2% AND 5% UNTIL 7/5/19* PASSPORT REQUIRED *CIRCLE TOUR** LETTER OUT WEEK OF 9/23
BO1.TempNotices is a temporary field used in processing.
BO2.Notice will end up with the individual notices that are between the double asterisks.
The following rules are BO rules on BO1.
First I move the MultiNotices to the TempNotices after TRIMMING it, removing any leading or trailing double (or more) asterisks, TRIMMING again and adding ' **' to the end
If BO1.MultiNotices WAS CHANGED Then
BO1.TempNotices=TRIM(REPLACE_PATTERN(REPLACE_PATTERN(TRIM(BO1.MultiNotices), '*{2,}', ''), '*{2,}$', '')) + ' **'
Then I create a new BO2.Notice with the data from the TempNotice upto the first set of double (or more) asterisks, after which I remove everything up to and including the first set of double (or more) asterisks. This rule has the 'While' loop selected so it will continue executing until the TempNotices is empty
If BO1.TempNotices CONTAINS '**' Then
CREATE BO2 WITH BO2.Notice=TRIM(REPLACE_PATTERN(BO1.TempNotices, '*{2,}.$', ''))
BO1.TempNotices=TRIM(REPLACE_PATTERN(BO2.TempNotices, '^.?*{2,}', ''))
If BO1.MultiNotices contains:
**2% AND 5% UNTIL 7/5/19* PASSPORT REQUIRED *CIRCLE TOUR** LETTER OUT WEEK OF 9/23
after executing the above rules, there would be 4 BO2 records with
2% AND 5% UNTIL 7/5/19*
PASSPORT REQUIRED
*CIRCLE TOUR
LETTER OUT WEEK OF 9/23