Skip to content

Instantly share code, notes, and snippets.

@dexalex84
Last active March 30, 2017 17:57
Show Gist options
  • Save dexalex84/7e33aadbffac5046b1df19b3d7d56608 to your computer and use it in GitHub Desktop.
Save dexalex84/7e33aadbffac5046b1df19b3d7d56608 to your computer and use it in GitHub Desktop.
Regular expressions example
This text:
ETZzz Hostel 2 звезд
Номер бронирования: 1343489307 Пин-код: 4776 Отдых
5 639 руб. THB 3 420
ЗАЕЗД
11
ФЕВ 2017
суббота
ОТЪЕЗД
15
ФЕВ 2017
среда
to this:
Panda House Chiang Mai 2 звезд
Номер бронирования: 1332756260 Пин-код: 6147 Отдых
2 556 руб. THB 1 550
ЗАЕЗД 5 ФЕВ 017 воскресенье
ОТЪЕЗД 8 ФЕВ 017 среда
Use that regular expression
FROM: ^(ЗАЕЗД)..([0-9]+)..([А-Я]+).([0-9]+)..([а-я]+)$
TO: $1 $2 $3 $4 $5
FROM: ^(ОТЪЕЗД)..([0-9]+)..([А-Я]+).([0-9]+)..([а-я]+)$
TO: $1 $2 $3 $4 $5
Tested in notepad++ 7.3.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment