Hey chatreg?
- Hi Pashute! should I call you Moshe?
How did you know my name?
- You told me last time. Anyways, what do you wish to
accomplish now?
I need a regular expression that finds an email and then
replaces the title the phrase before it to email to the guy's
name
and then a colon.
- you need a regex that FINDS AN EMAIL and then you want to
do
something with that. Let's start with finding an email. Do you
mean finds an email address in the text? Or did you mean
searches in your mailbox and finds a...
No. I mean finds an email address.
- OK so you need to know what the regex pattern for finding
the email address is. Right?
No. I know what that is.
- OK, just being clear here. So you want to search for any
email
address in the text right?
right.
- OK and then you said you want to change the title the
phrase
before email. What did you mean by that? Are you explaining
that when you say title you mean the phase before the email.
Yes that's what I meant.
- So what is this "Title" you want to change. Is it always there?
Could you read out a few of the titles here on sample text?
It says email with a colon.
- I see. But there are some emails where it says just Mail and
some with random words. It seems like it's just part of the
sentence. (You know that I don't understand enough to read,
so I
cannot tell if that is so myself. You will have to help me out
here.
What are you asking?
- I'm asking what to do in the case where the email doesn't
have
a "title"?
No that's a different part of the letter. Only if there's the
word
mail or email.
- OK. So we find the email address and find the title before it
which is the word "mail" or the word "email" followed by a
colon. right? Here I marked them in green and purple. See.
Looks good. Wait no, if there's a colon the words before it are
the title.
- Ah, I see now. That might get complicated, so let's change
for
now all the ones that say mail or email. Then we'll continue
to
fix the rest of the text, ok?
Yes. OK now take the addressee and put it there in the title.
- You said I should change the title to email to and then the
addressee right? Something like this, please take a look.
That's exactly what I need!
- OK so let me explain the regex and try out a few examples.
Great!! You made my day! Thank you.
YOU ARE WELCOME. THIS IS AN AUTOMATIC CANNED REPLY
MESSAGE . I AM PROGRAMMED TO BE AT YOUR SERVICE.