Genel bakış
Veri yükleme düzenleyicisi bölümünü açın ve aşağıdaki yükleme kodunu yeni bir bölüme ekleyin.
Komut dosyası, bir kuruluşun çalışanlarına gönderilen bir dizi kurumsal yazışmanın metnini içerir. Veriler, şirket adı ve her bir yazışmanın gönderildiği e-posta adresi dışındaki tüm kişisel tanımlanabilir bilgilerden (PII) zaten temizlenmiştir. Her bir mesajın gövdesi tek bir kesintisiz dizeye dönüştürülmüştür. Başka bir deyişle, tüm biçimlendirme ve satır sonu karakterleri kaldırılmıştır.
Gereksinimlerimiz:
-
Hangi iletilerin TestCompanyNameCorrespondence@test.com e-posta adresini içeren bir dize ve bu adrese gönderenin o olduğunu belirten özel bir giriş içerdiğini belirleyin.
-
Hangi tanıtımların tanımlanacağı konusunda esneklik istiyoruz, ancak yine de bazı kesin kısıtlamalara sahip olmak istiyoruz. Sender ve Sent by tanıtımlarının her ikisi de geçerli kabul edilir. Bu amaca ulaşmak için regex kalıpları kullanılabilir.
-
E-posta adreslerinin büyük/küçük harf duyarlılığı bir faktör değildir. Bu nedenle, arama büyük/küçük harfe duyarsız olmalıdır.
Komut dosyası
Correspondences:
Load * Inline [
ID|MessageBody
1|Sent by-- TestCompanyNameCorrespondence@test.com Good morning TestCompanyName team! I hope you are all well. I am just reaching out about the fabulous benefits package we launched just year. Our goal is to take a poll of what you all think. Can you please rate the new options from 1-10 in a response to this email, by this Tuesday? Thank you!
2|Sender: TestCompanyNameIT@test.com Did you know you can access our IT portal anytime, from any of your company devices? It's true! Reach out to your team lead to learn more.
3|Sender: TESTCOMPANYNAMECORRESPONDENCE@test.COM URGENT: This is a message to inform employees of an ongoing issue with our local branch. The branch will be closed until further notice. Thank you
4|Sender: TestCompanyNameVolunteering@test.com Dear team! We are looking for volunteers to help with this year's charity event! We need 40 volunteers to help with the event. If you are interested, please send an email to your direct supervisor. Thanks, TestCompanyName team members, for helping make the world a better place!
5|Sender is TestCompanyNameCorrespondence@test.com Hi folks, it's time to announce the annual TestCompanyName staff party! The party will be taking place at the office this year. Please make sure to RSVP, and we hope to see you there! Sincerely, the TestCompanyName management team
] (delimiter is |);
Sonuçlar
Verileri yükleyin ve bir sayfa açın. Yeni bir tablo oluşturun ve şu alanları boyut olarak ekleyin:
Aşağıdaki hesaplamayı ekleyin:
=CountRegExI(MessageBody,'(Sender.*TestCompanyNameCorrespondence@test.com)|(Sent by.*TestCompanyNameCorrespondence@test.com)')
Hesaplama özelliklerinde, Toplamlar fonksiyonunu Sum olarak ayarlayın. Bu, tablonun üst kısmındaki toplamlar satırını, sayıma katkıda bulunan toplam kayıt sayısını sayacak şekilde yapılandırır.
Hesaplama, ileti içeriğinde belirtilen regex deseni için eşleşme sayısını sayar. Regex deseninde .*, satır sonu karakterleri hariç herhangi bir karakter sayısını gösterir. Kalıp ayrıca e-posta adresinin nasıl tanıtıldığına ilişkin farklılıkları da açıklar: hem Sender hem de Sent by geçerli eşleşmelerdir. Fonksiyonun CountRegExI() varyantı büyük/küçük harfe duyarsız arama yapılmasını sağlar.
Sonuçlar tablosuTotals | - | 3 |
1 | Sent by-- TestCompanyNameCorrespondence@test.com Good morning TestCompanyName team! I hope you are all well. I am just reaching out about the fabulous benefits package we launched just year. Our goal is to take a poll of what you all think. Can you please rate the new options from 1-10 in a response to this email, by this Tuesday? Thank you! | 1 |
2 | Sender: TestCompanyNameIT@test.com Did you know you can access our IT portal anytime, from any of your company devices? It's true! Reach out to your team lead to learn more. | 0 |
3 | Sender: TESTCOMPANYNAMECORRESPONDENCE@TEST.COM URGENT: This is a message to inform employees of an ongoing issue with our local branch. The branch will be closed until further notice. Thank you | 1 |
4 | Sender: TestCompanyNameVolunteering@test.com Dear team! We are looking for volunteers to help with this year's charity event! We need 40 volunteers to help with the event. If you are interested, please send an email to your direct supervisor. Thanks, TestCompanyName team members, for helping make the world a better place! | 0 |
5 | Sender is TestCompanyNameCorrespondence@test.com Hi folks, it's time to announce the annual TestCompanyName staff party! The party will be taking place at the office this year. Please make sure to RSVP, and we hope to see you there! Sincerely, the TestCompanyName management team | 1 |
Beş mesaj arasında, belirtilen regex deseniyle eşleşen üç mesaj vardır. Her mesaj bir eşleşme içerir.
Bilgi notuMatchRegEx() fonksiyonu bu tür doğrulama kullanım durumları için de kullanışlıdır.