Check out example codes for "rails where regex". It will help you in understanding the concepts better.

Code Example 1

@max_draw = Drawing.where("drawing_number ~* ?", '^A\d{4}$')

Learn ReactJs, React Native from akashmittal.com