Ruby - Regular Expressions
Given a string containing dates in format "YYYY-MM-DD", how would you replace all dashes with slashes only if the year starts with "202"?
/(202\d)-/ captures years starting with 202 and a digit, followed by a dash.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions