Skip to content

Instantly share code, notes, and snippets.

@JasonMadeSomething
Last active August 29, 2015 14:26
Show Gist options
  • Save JasonMadeSomething/1b4cbb3c5654fd678d46 to your computer and use it in GitHub Desktop.
Save JasonMadeSomething/1b4cbb3c5654fd678d46 to your computer and use it in GitHub Desktop.
Problematic regex
Crain Ford Jax 1 of 2
Peruzzi Mazda 1 of 2
def next_job_title
/\A(\d*-\d{3})(?<mainTitle>.+) (?<current>\d+) of (?<total>\d+)\z/ =~ @title
@title = "#{mainTitle} #{(current.to_i + 1)} of #{total}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment