Tim Cheung

Joined

380 Experience
3 Lessons Completed
0 Questions Solved

Activity

Posted in Javascript frameworks videos?

One thing which struggled my head is:
What is the main purpose or use case for those js frameworks?

I see there are many features from angular overlapping with rails

e.g. ngRepeat overlapping render partial,
ngroute overlapping routes file

Also unlike jquery, those js frameworks are lack of useful components. So which prohibit me to totally dive deep to in right now.

Posted in Any good regex rules for validation?

Thank Chris, you save me ton of time :) I own you a starbuck!

Diego's regex look prefect for me, and i just realize the jquery validation plugins "formvalidation.io" also using this rule for validate url

Below is the ruby version i use

/\A(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)[email protected])?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]+-?)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]+-?)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?\z/i

Posted in Any good regex rules for validation?

Just find out this site, when you type the regex rule, it will explain it instantly. It's really cool.

https://regex101.com/

Posted in Any good regex rules for validation?

Currently, i am searching regex rules for validate url. And i am struggled how to build this from scratch. Is anyone have a good resources on this topic?

logo Created with Sketch.

Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

© 2020 GoRails, LLC. All rights reserved.