Re: python regex: variable length of positive lookbehind assertion

2016-06-15 Thread Marko Rauhamaa
Jussi Piitulainen : > Michael Torrie writes: > >> On 06/15/2016 08:57 AM, Jussi Piitulainen wrote: >>> Marko Rauhamaa writes: And nothing in alister's answer suggests that. >>> >>> Now *I'm* surprised. >> >> He simply said, here's a regex that can parse the example string the OP >> gave us (

Re: python regex: variable length of positive lookbehind assertion

2016-06-15 Thread Jussi Piitulainen
Michael Torrie writes: > On 06/15/2016 08:57 AM, Jussi Piitulainen wrote: >> Marko Rauhamaa writes: >>> And nothing in alister's answer suggests that. >> >> Now *I'm* surprised. > > He simply said, here's a regex that can parse the example string the OP > gave us (which maybe looked a bit like HT

Re: python regex: variable length of positive lookbehind assertion

2016-06-15 Thread Michael Torrie
On 06/15/2016 08:57 AM, Jussi Piitulainen wrote: > Marko Rauhamaa writes: >> And nothing in alister's answer suggests that. > > Now *I'm* surprised. He simply said, here's a regex that can parse the example string the OP gave us (which maybe looked a bit like HTML, but like you say, may not be),

Re: python regex: variable length of positive lookbehind assertion

2016-06-15 Thread Jussi Piitulainen
alister writes: > On Wed, 15 Jun 2016 15:55:42 +0300, Jussi Piitulainen wrote: > >> alister writes: >> >>> On Tue, 14 Jun 2016 20:28:24 -0700, Yubin Ruan wrote: >>> Hi everyone, I am struggling writing a right regex that match what I want: Problem Description: Give

Re: python regex: variable length of positive lookbehind assertion

2016-06-15 Thread alister
On Wed, 15 Jun 2016 15:55:42 +0300, Jussi Piitulainen wrote: > alister writes: > >> On Tue, 14 Jun 2016 20:28:24 -0700, Yubin Ruan wrote: >> >>> Hi everyone, >>> I am struggling writing a right regex that match what I want: >>> >>> Problem Description: >>> >>> Given a string like this: >>> >>>

Re: python regex: variable length of positive lookbehind assertion

2016-06-15 Thread Jussi Piitulainen
Marko Rauhamaa writes: > Jussi Piitulainen writes: > >> alister writes: >> >>> On Tue, 14 Jun 2016 20:28:24 -0700, Yubin Ruan wrote: Given a string like this: >>>string = "false_head aaa bbb false_tail \ true_head some_text_here ccc ddd eee t

Re: python regex: variable length of positive lookbehind assertion

2016-06-15 Thread Marko Rauhamaa
Jussi Piitulainen : > alister writes: > >> On Tue, 14 Jun 2016 20:28:24 -0700, Yubin Ruan wrote: >>> Given a string like this: >>> >>> >>>string = "false_head aaa bbb false_tail \ >>> true_head some_text_here ccc ddd eee >>> true_tail" >>> >>> I want to match the all

Re: python regex: variable length of positive lookbehind assertion

2016-06-15 Thread Jussi Piitulainen
alister writes: > On Tue, 14 Jun 2016 20:28:24 -0700, Yubin Ruan wrote: > >> Hi everyone, >> I am struggling writing a right regex that match what I want: >> >> Problem Description: >> >> Given a string like this: >> >> >>>string = "false_head aaa bbb false_tail \ >> true_head

Re: python regex: variable length of positive lookbehind assertion

2016-06-15 Thread alister
On Tue, 14 Jun 2016 20:28:24 -0700, Yubin Ruan wrote: > Hi everyone, > I am struggling writing a right regex that match what I want: > > Problem Description: > > Given a string like this: > > >>>string = "false_head aaa bbb false_tail \ > true_head some_text_here ccc ddd eee >

Re: python regex: variable length of positive lookbehind assertion

2016-06-15 Thread Lawrence D’Oliveiro
On Wednesday, June 15, 2016 at 3:28:37 PM UTC+12, Yubin Ruan wrote: > I want to match the all the text surrounded by those " ", You are trying to use regex (type 3 grammar) to parse HTML (type 2 grammar) ? No can do

Re: python regex: variable length of positive lookbehind assertion

2016-06-15 Thread Vlastimil Brom
2016-06-15 5:28 GMT+02:00 Yubin Ruan : > Hi everyone, > I am struggling writing a right regex that match what I want: > > Problem Description: > > Given a string like this: > > >>>string = "false_head aaa bbb false_tail \ > true_head some_text_here ccc ddd eee > true_tail" > > I w

Re: python regex: variable length of positive lookbehind assertion

2016-06-14 Thread Jussi Piitulainen
Yubin Ruan writes: > Hi everyone, > I am struggling writing a right regex that match what I want: > > Problem Description: > > Given a string like this: > > >>>string = "false_head aaa bbb false_tail \ > true_head some_text_here ccc ddd eee > true_tail" > > I want to match the a

Re: python regex: variable length of positive lookbehind assertion

2016-06-14 Thread Yubin Ruan
On Wednesday, June 15, 2016 at 12:18:31 PM UTC+8, Lawrence D’Oliveiro wrote: > On Wednesday, June 15, 2016 at 3:28:37 PM UTC+12, Yubin Ruan wrote: > > > I want to match the all the text surrounded by those " ", > > You are trying to use regex (type 3 grammar) to parse HTML (type 2 grammar) >

python regex: variable length of positive lookbehind assertion

2016-06-14 Thread Yubin Ruan
Hi everyone, I am struggling writing a right regex that match what I want: Problem Description: Given a string like this: >>>string = "false_head aaa bbb false_tail \ true_head some_text_here ccc ddd eee true_tail" I want to match the all the text surrounded by those " ", but