Path: csiph.com!usenet.pasdenom.info!aioe.org!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:group': 0.05; 'extracted': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'try:': 0.09; 'finney': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:member': 0.16; 'subject: ?': 0.16; 'code.': 0.18; 'examples': 0.20; 'example': 0.22; 'issue.': 0.22; 'header:User-Agent:1': 0.23; 'skip:" 30': 0.26; 'header:X-Complaints-To:1': 0.27; 'robert': 0.30; "i'm": 0.30; 'easier': 0.31; 'names.': 0.31; 'writes:': 0.31; 'regular': 0.32; 'text': 0.33; 'doing': 0.36; 'ben': 0.38; 'to:addr:python- list': 0.38; 'subject:can': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'how': 0.40; 'expression': 0.60; 'show': 0.63; 'world': 0.66; 'confusing': 0.84; 'subject:check': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Ben Finney Subject: Re: how can I check if group member exist ? Date: Fri, 21 Jun 2013 19:49:26 +1000 References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: rasputin.madmonks.org X-Public-Key-ID: 0xBD41714B X-Public-Key-Fingerprint: 9CFE 12B0 791A 4267 887F 520C B7AC 2E51 BD41 714B X-Public-Key-URL: http://www.benfinney.id.au/contact/bfinney-gpg.asc X-Post-From: Ben Finney User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) Cancel-Lock: sha1:naQwojLw16Ilqhha/aU1rAK5RXg= X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 21 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1371808186 news.xs4all.nl 15983 [2001:888:2000:d::a6]:60756 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:48855 Hans writes: > I'm doing a regular expression matching, let's say > "a=re.search(re_str,match_str)", if matching, I don't know how many > str/item will be extracted from re_str Can you show an example of the pattern, and several examples of text you want to match? This will help to understand your issue. Also, your terminology is using some confusing names. Try: match = re.search(pattern, text) That will use names which make it easier to think about the code. -- \ “Ours is a world where people don't know what they want and are | `\ willing to go through hell to get it.” —Donald Robert Perry | _o__) Marquis | Ben Finney