GetEmail(text)
Moderatore: Moderatori
-
- Messaggi: 3616
- Iscritto il: sabato 7 febbraio 2004, 1:00
- Località: Roma
- Contatta:
GetEmail(text)
Ciao a tutti
Ho costruito una funzione personalizzata che estrae tutti gli indirizzi email contenuti in un generico testo...
Spero che a qualcuno possa essere utile.
Funzione GetEmail (text):
Ho costruito una funzione personalizzata che estrae tutti gli indirizzi email contenuti in un generico testo...
Spero che a qualcuno possa essere utile.
Funzione GetEmail (text):
Codice: Seleziona tutto
/*
Author
Daniele Raybaudi
*/
Let([
adjustedText = Substitute ( text ; "¶" ; " " );
count = PatternCount ( adjustedText ; "@" );
len = Length ( adjustedText );
pos = Position ( adjustedText ; "@" ; 1 ; 1 );
startWord = Position ( adjustedText ; " " ; pos ; -1 ) + 1;
endWord = If ( Position ( adjustedText ; " " ; pos ; 1 ) ≠ 0 ; Position ( adjustedText ; " " ; pos ; 1 ) ; len + 1 );
word = Middle ( adjustedText ; startWord ; endWord - startWord );
nextText = Middle (adjustedText ; endWord + 1 ; len )
];
Case(
count ; word & "¶" & GetEmail ( nextText );
""
)
)
Raybaudi FMP 12 Adv. Windows XP SP3
-
- Messaggi: 1235
- Iscritto il: martedì 15 giugno 2004, 2:00
- Località: Cagliari
- Contatta: