kionite231@lemmy.ca to Programming@programming.devEnglish · 2 years agolast time when did you use Regular Expressions?message-squaremessage-square30linkfedilinkarrow-up116arrow-down11
arrow-up115arrow-down1message-squarelast time when did you use Regular Expressions?kionite231@lemmy.ca to Programming@programming.devEnglish · 2 years agomessage-square30linkfedilink
minus-squareDeprecatedCompatV2@programming.devlinkfedilinkarrow-up7·2 years agoYesterday, for capturing URLs.
minus-squarekionite231@lemmy.caOPlinkfedilinkarrow-up3·2 years agohttps?//[a-zA-Z0-9_-]* I am kinda learning RE right now 😅
minus-squarekionite231@lemmy.caOPlinkfedilinkarrow-up2arrow-down1·2 years agoIf we want to include every protocol then the RE could be complex.
minus-squarelad@programming.devlinkfedilinkEnglisharrow-up1·2 years agoDepending on the use-case it maybe should. On the other hand, some things are better left to library implementations rather than custom regex, e.g. email validation
Yesterday, for capturing URLs.
https?//[a-zA-Z0-9_-]*
I am kinda learning RE right now 😅
What about ftp? 🤔
If we want to include every protocol then the RE could be complex.
Depending on the use-case it maybe should. On the other hand, some things are better left to library implementations rather than custom regex, e.g. email validation