Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

regular-expression

In a regular expression, which characters need escaping?

August 9, 2022 by Magenaut

In general, which characters in a regular expression need escaping?

Categories Q&A, Unix & Linux Tags regular-expression, shell Leave a comment

What is the email matching regex in basic regex for grep?

August 9, 2022 by Magenaut

I created a text file and put some email addresses in it. Then I used grep to find them. Indeed it worked:

Categories Q&A, Unix & Linux Tags command-line, grep, regular-expression, shell Leave a comment

find command with regex quantifier e.g. {1,2}

August 9, 2022 by Magenaut

I have been trying to create a find command string that will find all files that end with a number 1-99 but exclude all others.

Categories Q&A, Unix & Linux Tags bash, find, regular-expression Leave a comment

Simple sed replacement of tabs mysteriously failing

August 9, 2022 by Magenaut

This ought to be really simple, but for some reason it is not working:

Categories Q&A, Unix & Linux Tags osx, regular-expression, sed Leave a comment

Replacing Multiple blank lines with a single blank line in vim / sed

August 9, 2022 by Magenaut

Question more or less says it all. I’m aware that /^$/d will remove all blank lines, but I can’t see how to say ‘replace two or more blank lines with a single blank line’

Categories Q&A, Unix & Linux Tags regular-expression, sed, vim Leave a comment

rsync certain files, excluding the rest, ignoring .svn/ directory, recursively

August 9, 2022 by Magenaut

I’m using rsync to copy some files from a share to another.

Categories Q&A, Unix & Linux Tags bash, file-sharing, networking, regular-expression, rsync Leave a comment

How to detect end of line with sed

August 9, 2022 by Magenaut

I’m looking for a way to only execute replacement when the last character is a newline, using sed.

Categories Q&A, Unix & Linux Tags newlines, regular-expression, sed Leave a comment

What is the regex to validate Linux users?

August 9, 2022 by Magenaut

When adding a new user, how is the string validated?

Categories Q&A, Unix & Linux Tags linux, regular-expression, users Leave a comment

grep and escaping a dollar sign

August 9, 2022 by Magenaut

I want to know which files have the string $Id$.

Categories Q&A, Unix & Linux Tags grep, quoting, regular-expression, shell Leave a comment

Are there zero-width assertions in sed?

August 8, 2022 by Magenaut

Is it possible to make lookahead or lookbehind zero-width assertions in sed? I want to emulate Perl’s (?=) and family.

Categories Q&A, Unix & Linux Tags regular-expression, sed Leave a comment
Older posts
Newer posts
← Previous Page1 Page2 Page3 Page4 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress