Regex question

  • Автор темы Автор темы irmscher
  • Дата начала Дата начала

irmscher

Client
Регистрация
28.11.2012
Сообщения
199
Реакции
6
Баллы
18
Why the following regex:

*,\s(and)\s.*?\.\s

from

I'm a keen programmer, and I don't want this project to get screwed. If I was a cook, and you were a gamer then we could be a good team. My friend like beer, and I love vodka. My parents are the best parents in the world. I think that everything is going to be alright, and some people are moaning too much. I wish I had more spare time, and then I could visit swimming pool more often.

grabs

I'm a keen programmer, and I don't want this project to get screwed. If I was a cook, and you were a gamer then we could be a good team. My friend like beer, and I love vodka. My parents are the best parents in the world. I think that everything is going to be alright, and some people are moaning too much.

instead of supposed

I'm a keen programmer, and I don't want this project to get screwed.
 
I'm a keen programmer, and I don't want this project to get screwed. If I was a cook, and you were a gamer then we could be a good team. My friend like beer, and I love vodka. My parents are the best parents in the world. I think that everything is going to be alright, and some people are moaning too much. I wish I had more spare time, and then I could visit swimming pool more often.

Should be:

*?,\s(and)\s.*?\.\s
 
Why overcomplicate things...

.*?\.
 
Ok, answering my own question

Just got back on working on this script and just figure out that it's:

.*?,\s(and).*?\.
 

Кто просматривает тему: (Всего: 0, Пользователи: 0, Гости: 0)