Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Unexpected (?) result with regular expressions
Post: RE: Unexpected (?) result with regular expressions

I found that if I just add one or more or the original string at the beginning of the search string, I get my desired output: import subprocess, re print(re.sub('l[^0-9]*([0-9\.\-]*)', r'LibreOffice \...
guraknugen General Coding Help 2 2,231 Jan-18-2020, 02:33 PM
    Thread: Unexpected (?) result with regular expressions
Post: Unexpected (?) result with regular expressions

Hi! I'm running Python3 in Manjaro Linux 18.1.5 and I want to ”emulate” sed. Here's an example in Bash using sed, this is the result I want: Output:~ $ echo "libreoffice-still 6.2.8-4" | sed -r 's/[^...
guraknugen General Coding Help 2 2,231 Jan-18-2020, 02:19 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020