Monday, October 26, 2020

#1 2020-10-14 11:13:19 pm

cjsfj
Member
Registered: 2017-06-12
Posts: 3

Find string in mail message source using regex

Easy enough, or so I thought.

I'm using AppleScript to pull the source of a mail message into a variable called `theSource`. I'm able to put this source into the clipboard and paste its contents in a text doc, which shows me that the formatting is good.

Now I want to use regex to search that source and return any matches. Here's the regex:

(?<=\>)Ref:.*?(?=\<)

The first match should be set as the clipboard. After a few hours, I'm nowhere. So I thought I'd post here.

Thanks!

CJ

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)