Posts by carlosn • 176 points
5 posts
-
0
votes1
answer222
viewsA: Remove WWW and HTTP / HTTPS with regular expression
To remove www, http and https you need to use replace as follows: string.replace( /www|https?/ , ''); The ? indicates that the s is optional can exist or not and if there is will be replaced. The |…
-
1
votes2
answers146
viewsA: Find a number after a specific word with grepl and regex {r}
The following regular expression should solve the problem: "(?:km|rua)+\s*\D+?" Despite the small data show, I believe that if there are more variations just edit them. Example in Regex101…
-
3
votes3
answers681
viewsA: Extract date with Regex
Your regex is correct, but the ^ is an anchor and indicates that will perform the match at the beginning of String. To the String in question the ideal is to give a match on the first occurrence of…
-
0
votes2
answers59
views -
2
votes2
answers115
viewsA: Because Chr() is vulnerable to "cache-timing" attack and pack() is not?
When it comes to cryptography there are several aspects that should be taken into account. The fact of wearing pack() instead of char() refers to a concept called Binary safe making both input and…