Skip to content

Instantly share code, notes, and snippets.

View diirtydog's full-sized avatar
😀
Hell Yeah!

Andrew Wales diirtydog

😀
Hell Yeah!
View GitHub Profile

Regex That Selects Job I.D.

Gangster

Most job identification numbers for construction companies are selected based on a few criteria. Whether your company implements the zip code, just a random series of numbers, or a numerical code they are typically used to track the expenditures of a particular job. So what is an easy way to identify these job I.D.'s? Well through the power of a regular expression we can pull this data from a source. The example I'm using for this gist is formatted for the company I currently work at. The Job I.D. for the job I'm on right now is "SRA-75169-01".

Summary

I will make a regex that pulls a job I.D. so it can be compared to profit margins. This regex will not be only usefull for comparisons to profit margins alone though. It will also be a usefull tool to extract expenditures and any other type of data your company would like to associate with a job I.D.