On Mon, 08 Dec 2014 12:22:37 +0530, Ganesh Pal wrote:
pattern
'Token-based migrations cannot be mixed with level-based: [prev 0 , now
1]'
Because [] defines a character class in a regex, if you want literal
[ and ] you need to escape them with backslash.
[prev 0 , now 1] - match any single
Hi Folks ,
This might seem to be very trivial question but iam breaking my head over
it for a while .
My understanding is that re.search should search for the match anywhere in
the string .
why is re.search failing in the below case ??
pattern
'Token-based migrations cannot be mixed with
Ganesh Pal writes:
why is re.search failing in the below case ??
Your pattern, '... level-based: [prev 0 , now 1]', matches a literal
string '--- level-based: ' followed by 'p', 'r', 'e', 'v', ' ', '0',
..., or '1', none of which is the '[' found in your text at that
position.
Are you sure
On Dec 08 at 12:22 +0530, Ganesh Pal wrote:
Hi Folks ,
This might seem to be very trivial question but iam breaking my head over
it for a while .
My understanding is that re.search should search for the match anywhere in
the string .
why is re.search failing in the below case ??
On Mon, Dec 8, 2014 at 12:52 AM, Ganesh Pal ganesh1...@gmail.com wrote:
Hi Folks ,
This might seem to be very trivial question but iam breaking my head over
it for a while .
My understanding is that re.search should search for the match anywhere in
the string .
why is re.search failing
Jussi Piitulainen writes:
Ganesh Pal writes:
why is re.search failing in the below case ??
Your pattern, '... level-based: [prev 0 , now 1]', matches a literal
string '--- level-based: ' followed by 'p', 'r', 'e', 'v', ' ', '0',
..., or '1', none of which is the '[' found in your text
Thanks guys , I escaped the '[' character and my issue is sloved .. Thank
you guys u all rock :)
Regards,
Ganesh
On Mon, Dec 8, 2014 at 12:41 PM, Zachary Ware zachary.ware+pyl...@gmail.com
wrote:
On Mon, Dec 8, 2014 at 12:52 AM, Ganesh Pal ganesh1...@gmail.com wrote:
Hi Folks ,
This