E
E
Egor Mikheev2015-10-28 02:23:39
MySQL
Egor Mikheev, 2015-10-28 02:23:39

What is the syntax for creating a regular expression for a calculated field in MySQL?

Hello, I'm not sure if this is faster than with PHP (but there will be no extra spacers), but I would like to know. How can I write a regular expression for a calculated field in a MySQL table.
Banal example:
| id | address | street | home |
| 1 | g. Mocsow, ul. Sadovaya, h. 24, | ? | ? |
| 2 | g. Mocsow, pr. Dezhnva, h. 23 , | ? | ? |
Well, it’s appropriate to get a street and a house. into separate fields.
The line format is as follows: Ukhta, st. Gorky, d. 6
In principle, it is normalized and you can cling to the fact that before "," and the number of occurrences.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rsa97, 2015-10-28
@ogregor

Regular expressions in MySQL are used only as a "matches a mask" boolean function. There is no selection of substrings or their replacement.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question