I have mentioned it in the comments below, but to explain it simply, I just wanted to remove all the bracketed text + a dash if there is no other text.
- 2 Posts
- 34 Comments
You are right. It is just removal of the bracketed text. The input is multi-line string, so only flag used was the multi-line mode.
These are string lines I have encountered and how I wanted to change them:
1. "[...]" -> "" 2. "-[...]" -> "" 3. "-[...] text" -> "-text" 4. "-text [...]" -> "-text" 5. "[...] text [...]" -> "text" 6. "-[...] text [...]" -> "-text"The main point is that I needed to remove the dash only if there is no other text on the line.
I have tried the regex you are suggesting at the beginning, but it failed at points (3) and (6).
EDIT: It just occurred to me that the first line of my comment sounds like stupid AI. 🤦
It may feel like it, but I needed to handle all the edge cases. But if you think it can be simplified, I’m willing to learn.
I never understood why are people scared of regular expressions. I love them and they can be quite usefull.
Here is an example of one regex I wrote recently - it is used in replace:
(?:^-\[[^[]+\]$| ?\[.+?\] ?)
That’s why I hate banking apps. It’s 5-factor authentication for me and it’s seriously annoying.
The factors for logging into the internet banking are:
- Having a password manager - Something I have
- Remembering a master password - Something I know
- Having a banking app on the phone (🤮) - Something I have
- Using a password to log in to a user that has the app installed (I have a GrapheneOS and the banking app requires Gurgle services, so the services and apps must be separated) - Something I know
- Using a PIN inside the banking app to confirm the login - Something I know
You cannot call yourself an admin if this didn’t happen to you.
It’s not a bad idea but that idea breaks as soon as you have to change the master password. You would have to change every one of those passkeys. Which could be annoying, if you have a lot of them.
BiscuityCat@lemmy.worldto
News@lemmy.world•Iran strikes on Amazon data centers caused permanent loss of customer data
103·15 天前Just give any American $1000 and they will be happy to do that.
There is also an option to use an email provider that offers proper email aliases, like runbox. This way your real email address (login username) may never reach the internet.
BiscuityCat@lemmy.worldto
Programming@programming.dev•[Solved] Any opensource, themed CV generators out there?
2·2 个月前I have written my CV in HTML, CSS, little bit of JavaScript and handlebars.js library (single JS file). I have all the texts inside JSON files (one file per language). I can switch between languages simply by changing a variable and refreshing the page.
When I need to update the CV, I just change the text and print the CV as a webpage into a PDF using an Ungoogled Chrome (Firefox has a bug that causes the page to print in a slightly wrong size).
It may be overkill for some, but for me it was easier to properly style the page using a CSS than using Writer/Word.
BiscuityCat@lemmy.worldto
Steam@lemmy.ml•Anyone who ordered Steam hardware in the last ~3 months in Europe just had their names, address, phone number and email stolen
5·2 个月前There are quite few things you can do, depending on where you live:
- Do not put your real name or address into the forms if possible.
- Use temporary phone number.
- Use alias email address and change it if it gets leaked.
I’m still scared every time I have to update something, so I try to avoid updates if possible.
Most of the time when I had to update Windows or some software, something would break (and no previous bug would be fixed) and I would have to spend a whole day trying to fix the stupid issue.
TBH, I don’t even remember if an update ever fixed something for me (but it probably happened at least once).
BiscuityCat@lemmy.worldto
PC Master Race@lemmy.world•You can now play Half-Life 2 right inside your browser at over 100 FPS with save states & console support — Ingenious port recreates the entire game campaign using WebGL 2English
12·3 个月前Looks interesting, but it does have serious issues:
- Cannot change controls.
- Performance is bad. Lagging as hell.
- Missing textures:

- Sound does not work.
BiscuityCat@lemmy.worldto
Games@lemmy.world•If Steam were to shut down tomorrow how much money would you have lost in total on games / DLC ??English
72·3 个月前
Every insteresting game I “bought” on Steam is backed up (including a crack if required).
Don’t worry. That option was there as well.
However, depending on the website it may require your watch history before allowing you to login.
It reminds of this:

There were more options on the website, but I forgot the name of the website, and I cannot find it now… :(
BiscuityCat@lemmy.worldto
PC Master Race@lemmy.world•Microsoft is making Windows 11 updates require just one reboot instead of severalEnglish
1·4 个月前The PC reboots multiple times and every time I have to type LUKS password. It’s really annoying.
BiscuityCat@lemmy.worldto
PC Master Race@lemmy.world•Microsoft is making Windows 11 updates require just one reboot instead of severalEnglish
1·4 个月前It would be nice if Fedora did that as well.
I though so as well. However, I don’t even see anything similar to disabling (USB) devices like in Windows.






I feel you.
I heard the banks where I live are thinking about providing multi-generational loans so people would be able to pay for them.