@terdon Not sure what you mean. in regex101.com, type in "(?s)image\s+?not\s+?available.*?$\K" for both PCRE and Python, it is not recognized for Python.
I didn't know (?s) not work for Python regex. I was referring to "\K"
Is there a reference (webpage, book,) which compares equivalent syntax between Python regex and Perl regex, so that I can manually convert between them?
@terdon if you're doing Python regex fun you can pass it when you compile the regex though, re.compile(r'REGEXHERE', re.MULTILINE + re.IGNORECASE) as an example.
(both re and regex support that). Just as an FYI :P
recently struggled with multiline searches recently in a project with regex
The \K should be irrelevant anyway, that just means "forget everything you matched until here" so since it's at the end of the pattern, there is very little reason to use it at all
I am guessing this comes from an answer that was using it to match but suppress output
I'd appreciate some reference (webpage, book,) which compares equivalent syntax between Python regex and Perl regex, so that I can manually convert between them.
What references do you use to master different regex flavors?
@Tim it's listed but whether it's actually still supported i can't say. it might be prudent to consider that it isn't necessary if you also call `re.compile(r'pattern', flag + flag + flag + ...)
Some open ended question. Being a Linux/Unix user, how would you consider a switch to working on .Net with C# under Windows in your career, short term or long term? I feel it is detrimental if haven't used Windows for a long time, and still in the stage of becoming familiar with Linux and development tools that are not binded to Windows. Some said then it is my problem, as if a qualified person shouldn't have such problem of switching back and forth
I don't want to learn cmd or powershell, because I have already invested so much on learning Bash, and don't want to take a break or give it up, and have another headach with Windows.
Even if .Net and C# may not use cmd or powershell much, the tools on Windows are so different and restrictive, and I am not familiar with Windows for so long.
sysadmin can admin both Linux and Windows, however
I have a short experience of working on .Net and C# in Windows, it is just so different, and I feel all my previous experience in Linux can't be useful as they should be, and when I got out out that C# experience, I feel I was lost.
I felt being more restricted on WIndows, and so much to learn from beginning. When I got out of that experience, I don't even want to think about it any more. But someone seems to blame it on me.
@ThomasWard I think sysadm may have more challenge to work with different OSes.
I don't mind being said unqualified. Just want to know anyone out there: how you think about such switch, and whether you are willing to switch, and if you do, how you coped or would cope with that.
Personally I would avoid it at all my best, at least for now, considering that I am still developing my skills not related to Windows, and leave it open in the future.
@Tim I'm also an admin not a developer but I recently moved from 15 years working almost exclusively on windows to working in an all unix environment and I actually am really happy about it. It's not like I completely forgot everything I know about windows and it has been a very fun challenge to come up to speed with unix. I was becoming bored with windows.
@Tim Also I am a strong supporter of powershell and do not agree with your suggestion that it is restrictive. It's a great language and helped me transition fairly easily into bash, however I can't speak much to going the opposite direction.
I guess it's a very difficult situation though. I have always fantasized about specializing in one thing and having the time to truly master it, but in practice I have always become restless and try to work on/learn as many different things as possible
@FaheemMitha To be fair, almost any "sysadmin" task can be googled to solve the issue
that extends to computer network design, firewall design/rulesets, etc. too
at least, in the modern era, with StackExchange sites and SO and such
meshing all that knowledge together with an IT Security background though, that can't be done easily, so some of us have to actually know the things and adapt that knowledge when you weave in proper IT SEcurity at the same time
@ThomasWard Heh yeah I kid, but I have worked with many security people that came from a non-IT background. They were good at setting policy without really knowing why
My current company's security team made such a big deal out of the fact that all our usernames are publicly available. Which granted it's not ideal but I don't see it as a security issue
They would say "It's half of your authentication challenge, it should be private" (not even true because we use two factor auth so it's 1/3rd of our auth challenge). Also it's the public "half", also every companies usernames are public because it's either first initial last name, first name . last name, or first name last name with no space
@StephenKitt That's probably a much more useful thing since I have emailed chief level staff of several companies when their customer support isn't helping me :-P
if their support person's email is [email protected] it almost always means their ceo will also be [email protected], and their name is listed on the website
@FaheemMitha Oh yeah. I spoke to the ceo of centurylink recently and then got called by 3 different directors who all gave me their cell number and told me to call them if I ever have issues in the future
Their noc responds to our emails almost immediately now. Their phone line is still trash though but that's all companies
at least you didn't have to sit on the phone dealing with Sophos for five hours just to be told "Oh yeah the virtual email appliance you're using is totally fubar and we can't make it work again, so you need to redeploy it from scratch"
(this was me on Monday... that was NOT a good day)
well it also doesn't help that since i've been brought on full time I've been the spearhead behind multiple major changes to system infrastructure here
email system mail flow, email gateway system replacement, firewall configurations, network layouts...
to be fair sometimes I think I'm not paid enough, but at the same time it's a chance to use all my knowledge in practice so :p
Not to mention a complete overhaul so that VLAN ACLs actually work (there were ACLs, and they were actually sane, but they didn't function previously because reasons)
@Jesse_b better to be able to help make things work than to sit there on your hands unable to make things work or make them be secure, in my opinion :P
@ThomasWard One of my companies had over 50k lines of ACL on their firewalls because one of the admins would just add a new rule every time he needed something and forget it
@Jesse_b That reminds me of the time when I wrote to Jeff Bezos after spending weeks of frustration trying to get Amazon India to fix a simple problem.
Suddenly I had people calling me.
@Jesse_b That sounds like it belongs in your "getting to know you" answer. Hint, hint.
@Jesse_b They fixed it, at least for me. I was a bit alarmed at the implication that they might have fixed it just for me. In India they have something called Net Banking, which is basically direct electronic transfer of funds from one account to another. Amazon India listed my bank, but then it stopped working - as in, if I selected the option, it would give me an error, saying it wasn't available.
But then I realised that if I deliberately failed the payment process, it would let me try again - possibly an indefinite number of times. And if I tried to redo the failed process, it would work. I then wrote to Amazon India repeatedly, and also talked to their customer service with no effect. It was very frustrating.
Such things are not unknown elsewhere, but in india the fractured English and general cluelessness + the fact that everyone apparently reads from the same script, definitely adds to the frustration.
I think customer service in the US was pretty dire too, but things broke down far less often there.
Anyway, after I wrote to Bezos, I got calls telling me it would be fixed right away. It wasn't, but they did, eventually. Actually, I think I might have written to Bezos a second time.
@Jesse_b Not all of them. I can tell when I'm speaking to an Indian. Their speech patterns are very recognizable, and distressingly uniform. Doesn't anyone read books any more? There is a whole universe of possible sentences out there. You don't have to be a poet to explore it.
And in general Amazon CS is stellar, compared to some others. E.g. Airbnb, which mostly sucks.
The thing is, since the bank option still worked with my workaround, as described above, there was obviously nothing really wrong, and it should have been easy to fix. But this went on for months, I think.
If Amazon has any competent coders, they clearly weren't working on that issue.
@Jesse_b Too bad?
Plus, payment gateways, or whatever they are called, are not exactly rocket science.
@FaheemMitha Yeah I don't work professionally with windows anymore so I don't mind. My issue was that windows 10 comes prepackaged with "candy crush soda saga" installed from the microsoft app store on the user account you set it up with. So when you go to sysprep the machine it gives an error since that is not installed globally, and the only way to uninstall it is through powershell
@ThomasWard Yeah it was candy crush and one other app. I dunno if it was something I did during install but when I was googling it I found others with the same issue (granted it didn't seem to be a very well documented issue) so I know I wasn't the only one but it may be a semi isolated issue
@Jesse_b I think in the latest version of the installer ISOs they adjusted it so it'd be different for "I use this for work" instead of the "I use this for personal" options
Win10 Pro seems to have that inquiry anyways
and of course if you have oodles of money, Win10 Enterprise doesn't come with that stuff anyways
what was the name of that script that allows you to download different color schemes for gnome-terminal, such as monokai, dracula, etc. as a big list. i think it may have been made in python