Posts

Showing posts from February, 2018

GSuite Filling the G-Apps: Forms, Contact Numbers and Regular Expressions

Image
GSuite Forms added their regular expression functionality a while ago but finding the correct combination for your scenario online can be cumbersome if you're not heavily into a language that makes use of regular expressions in it' entirety and Google doesn't seem to provide relevant samples probably because the combinations can be vast and "why don't you just Google it?". Below are some details I found useful for enforcing correct number formatting when entering details in some Google Forms I've had to create: I found "The Cheat Sheet - Javascript regular expressions " useful in resolving some of these: http://cheatsheet.zemplate.com BSB ^\d{3}-\d{3}?$ This uses a strict (3-3) format i.e. ###-### TFN Australian Tax File Numbers are  9 digits in the format of (3-3-3) ^(\([0-9]{3}\)|[0-9]{3}-)[0-9]{3}-[0-9]{3}|(\([0-9]{3}\)|[0-9]{3} )[0-9]{3} [0-9]{3}|(\([0-9]{3}\)|[0-9]{3})[0-9]{3}[0-9]{3}$ ABN Australian Business