-
Notifications
You must be signed in to change notification settings - Fork 40
Update app.ts #32
base: main
Are you sure you want to change the base?
Update app.ts #32
Conversation
added functionality for domains and mails
|
@tibor Could you give me some examples of substitution that are not clear to me when reading the regular expression? |
|
Sorry! (@) = the capturing group, i.e. what we want to replace That would get all parts that look like @ifttt.com and then we replace the capturing group (= the @) with @ + "zero width space" so that there is a space between the @ and the domain part |
|
@tibor It seems to me a too drastic replacement, it would be better if the code did not completely eliminate the handle perhaps but transforming it into something that is not ambiguous between a url and a handle, like @iffttt.com -> iffttt.com. But it's a hypothesis what do you think? |
|
I’m not sure, what is the difference between @iffttt.com and iffttt.com? Do you mean deleting the @? |
yes |
|
Okay, my solution is a similar approach. Instead of deleting the @ it replaces it by @ + a zero width space. So it looks optically like the original tweet but isn’t a handle anymore. |
|
@tibor It seems to me that your code removes everything after @ Am I missing something? |
|
Sorry, fixed it! |
added functionality for domains and mails