Question: Need help with a regex which will accept anything except alphabets(Aa-Zz), numbers(0-9) and @

For e.g diff input types

```
bony -> fail
gup12-> fail
@    -> fail
!#$  -> pass
*&%  -> pass 

```

Answer: 
First a warning: there are many regex implementations in different languages, so some details may vary, but these are generally true on all platforms:

With regular expressions you can use `[` and `]` to define a *character class*, which is a set of characters that can be matched. See: <https://www.regular-expressions.info/charclass.html>

So to match any English letter, you could use `[A-Za-z]`. (This will not match accented letters though.) Similarly, you could match a number with `[0-9]`. (This will not match characters that represent numbers in other scripts like Arabic.) You could match any of those with `[A-Za-z0-9]`.

You can also *negate* a character class, by starting it with `^`. So `[^0-9]` matches anything except those 10 digit characters. Likewise `[^A-Za-z0-9]` matches anything except English letters and digits.

There are a few shorthands supported for common character classes on many platforms:

* `\d` matches any digit (0-9), but on some platforms this will also match any character that represents digits in any script (Arabic, etc)
* `\w` matches any "word" character, which is anything you can usually use in a variable name: letters, numbers, and `_`. Again, in some platforms this will many anything that counts as a letter in any script (Arabic, Cyrillic, etc)
* `\D` is the complement of `\d` and matches anything not in `\d`.
* `\W` is the complement of `\w`

See: <https://www.regular-expressions.info/shorthand.html>

So for your case, you may want the class `[^A-Za-z0-9@]` to match anything except those characters.

Then you can add the quantifier `+` at the end to match that one or more times. `[^A-Za-z0-9@]+`

See: <https://www.regular-expressions.info/repeat.html>
Here you go `[^\w@]+`

You might want to add \n to avoid empty matches on multiline strings: `[^\w@\n]+`