File tree Expand file tree Collapse file tree 1 file changed +32
-1
lines changed Expand file tree Collapse file tree 1 file changed +32
-1
lines changed Original file line number Diff line number Diff line change 1
- Extract email address from any raw text data that contains email address
1
+ #Extract email address from any raw text data that contains email address
2
+
3
+
4
+ ##Explanation:
5
+
6
+ ###Get Input and Options:
7
+
8
+ input: Retrieves the text from the input textarea.
9
+ separator: Determines the separator based on user selection.
10
+ string: The string to filter emails by (if applicable).
11
+ groupBy: The number of emails to group together.
12
+ addressType: Whether to extract emails or URLs.
13
+ filterType: Whether to include or exclude emails based on string.
14
+ removeKeywords: An array of keywords to exclude from the results (if UseKeyword is checked).
15
+ Set Email Regex:
16
+
17
+ Selects the appropriate regular expression based on addressType and RemoveNumeric checkbox.
18
+ Extract and Filter:
19
+
20
+ rawEmails: Extracts potential emails/URLs using the regex.
21
+ uniqueEmails: Uses a Set to get unique emails efficiently.
22
+ filteredEmails: Filters emails based on filterType, string, and removeKeywords (if UseKeyword is checked).
23
+ Sort (Optional):
24
+
25
+ Sorts the filteredEmails alphabetically if the sort checkbox is checked.
26
+ Format Output:
27
+
28
+ Joins the filteredEmails with the chosen separator and groups them if groupBy is specified.
29
+ Display Results:
30
+
31
+ Updates the count input with the number of extracted emails.
32
+ Sets the output textarea's value to the formatted email string.
You can’t perform that action at this time.
0 commit comments