Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: help on python regular expression named group

Reply
Thread Tools

Re: help on python regular expression named group

 
 
Joshua Landau
Guest
Posts: n/a
 
      07-16-2013
On 16 July 2013 16:38, MRAB <(E-Mail Removed)> wrote:
> On 16/07/2013 11:18, Mohan L wrote:
>>
>> I using another third party python script. It takes the regex from
>> configuration file. I can't write any code. I have to do all this in
>> single regex.
>>

> A capture group captures a single substring.
>
> What you're asking is for it to with capture 2 substrings (the date and
> the time) and then join them together, or capture 1 substring and then
> remove part of it.
>
> I don't know of _any_ regex implementation that lets you do that.


If MRAB is correct, there is one straw-clutching method. If in the
configuration you pass a regex *object* rather than a regex string,
you could duck-type as a regex object. This might sound far-fetched
but it's happened once to me.

Otherwise, good luck.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
help on python regular expression named group Mohan L Python 3 07-17-2013 08:00 AM
Re: help on python regular expression named group MRAB Python 0 07-16-2013 03:38 PM
Re: help on python regular expression named group Mohan L Python 0 07-16-2013 10:18 AM
Re: help on python regular expression named group Joshua Landau Python 0 07-16-2013 08:42 AM
Dynamically changing the regular expression of Regular Expression validator VSK ASP .Net 2 08-24-2003 02:47 PM



Advertisments