D
D
Dmitry Zinchenko2017-11-13 11:36:33
Database
Dmitry Zinchenko, 2017-11-13 11:36:33

Regular expression for price validation?

Good time of the day.
Help me write a regular expression.
The price must contain 7 digits, but it must be possible to enter a maximum of 2 decimal places.
For example:
5555555
555555.5
55555.55
Is it possible to solve this at all with regular expressions or do I need to look for some plugin?
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
S
sim3x, 2019-08-21
@sim3x

postgresql

I
Ivan Melnikov, 2019-08-21
@immelnikoff

In fact, almost any DBMS can be configured for these purposes.
Take MySQL 8.0 for example. Install the MySQL server and set the lowest level of transaction isolation - READ UNCOMMITED - to disable MVCC and, accordingly, increase concurrency. This server will accept data for writing.
Install another MySQL server - a replica (the main server, respectively, is the master). Read requests will be made to it.

I
Ivan Shumov, 2019-08-21
@inoise

Is the bottleneck exactly in the database? If so, then mongo scales horizontally, well, or just throw resources if the server is hard. If the bottleneck is not really there then think further. Well, it’s not clear what “big flow” means according to your version

A
Alexander, 2017-11-13
@dsent

Is it like this: https://regex101.com/r/ybA2gK/1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question