Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Ian Kelly Newsgroups: comp.lang.python Subject: Re: non printable (moving away from Perl) Date: Thu, 10 Mar 2016 20:52:46 -0700 Lines: 29 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de 6Pz5uL6jSQekSiUjRgTLgAOMCqStjE/DXhFMOhXjJ50g== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'url:pypi': 0.03; 'received:209.85.223': 0.03; 'classes,': 0.05; 'plenty': 0.07; 'pypi': 0.07; 'skip:/ 10': 0.07; 'cc:addr:python-list': 0.09; 'python.': 0.11; 'translate': 0.15; '>>>': 0.15; '"mark': 0.16; '2016': 0.16; 'cc:name:python': 0.16; 'email addr:hotmail.com>': 0.16; 'posix': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:non': 0.16; 'wrote:': 0.16; 'module,': 0.18; '>': 0.18; '>>>': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'for?': 0.23; "python's": 0.23; 'header:In-Reply-To:1': 0.24; 'module': 0.25; "doesn't": 0.26; 'message-id:@mail.gmail.com': 0.27; 'perl': 0.29; 'character': 0.29; 'another': 0.32; 'url:python': 0.33; 'skip:& 20': 0.35; 'received:google.com': 0.35; 'easiest': 0.35; 'but': 0.36; 'there': 0.36; 'url:org': 0.36; 'lines': 0.36; 'received:209.85': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:209': 0.38; 'sure': 0.39; 'subject:from': 0.39; 'avoid': 0.61; 'above,': 0.63; 'mar': 0.65; 'funny': 0.83; '5:15': 0.84; 'testers': 0.84; 'to:none': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc; bh=h0QwD/xKzsO4sDK8HXbhbq7Qd7JjbkYuOACXvxeeqL8=; b=oM9+PE0ihiSuvu0SDw82FHJDF1bS5zIl13pkQuEugIphntYgI3iEqP5wOmevbNoIHd hCOQWaYYS8wyrJxtnWBbwiJAgKz+mkYHbI5mWjDEC1EqXAeChMiQMByioLfkXCxOjwuv gUtlz4xZoJPAftlW5prq/RRz8hqE9GrSeBizK8WJtdIyC51BG50cg0VuCx5MZrGV1qPa zgaiUwrhUEmy0kxH0vubDsReTWIoZHuUk/w11GZdqsFcpwoTK+QDEU/bKI3wN81BoJ67 b62ke0lBiSjgskdUe2ValpvdRn9RyXixaoPboURz1oWU9u7/mrzau+Ag03XCXIGh2hWZ 9L4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:cc; bh=h0QwD/xKzsO4sDK8HXbhbq7Qd7JjbkYuOACXvxeeqL8=; b=CjlKNVly0ITBjTb18Vb7SRLXxOe8seCBVzJHc4FVajtJRsEjEdCpaGVVTaLHOHDeyx vFUm5LX3y8LVE/OKBswB7MD312CiMFD2WBlWH0gHyoKPNR3CKKZrp7zcvvp2tWn6Ma21 5vWDNf9Ccbnm5x7oQEw4mLyFYfg5TC8D4nPFQutAqJlNJ3Yh6t4e6W9So7gkgPjhYiao qF/vZian8AIp+k5COsqIIGWdZSy/nOg255UUm1ibGdpY4B5sJGI4lVlkTPjJcIr3JHk7 YC/aEtMwVmiHpX9mxI7af1+xZB6rbLXehpmfWBwf/9ZW/CwQ24fR1Te6ojtmRcqaVd5b CwlA== X-Gm-Message-State: AD7BkJJEWSu5ogm3Nmcry5y/LXiG6VpEvVyYycjEEirFJH/Dk/isHRGUBmcGSTzh25PYyj3bovqrxskZi4haeA== X-Received: by 10.107.11.10 with SMTP id v10mr7154097ioi.188.1457668366321; Thu, 10 Mar 2016 19:52:46 -0800 (PST) In-Reply-To: X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:104579 On Mar 10, 2016 6:33 PM, "Mark Lawrence" wrote: > > On 11/03/2016 00:25, Ian Kelly wrote: >> >> On Mar 10, 2016 5:15 PM, "Fillmore" wrote: >>> >>> >>> >>> Here's another handy Perl regex which I am not sure how to translate to >> >> Python. >>> >>> >>> I use it to avoid processing lines that contain funny chars... >>> >>> if ($string =~ /[^[:print:]]/) {next OUTER;} >> >> >> Python's re module doesn't support POSIX character classes, but the regex >> module on PyPI does. >> >> https://pypi.python.org/pypi/regex >> > > There are plenty of testers for the re module, but do you know if there are any available for the above, as it's not the easiest thing to search for? No idea.