-3

I'm having issues with writing out an expression to block some words.

This is my current code. I am currently just using regex101.com to test it.

(^[GgƓɠḠḡǴǵĜĝǦǧĞğĢģǤǥĠġ](?:[^a-zA-Z]*)([ÂâÅåÀàÁáÃãÄäEeAaÆæ4@]+\s{0,30})([.*\S*]{0,1}$)|(?:[^a-zA-Z]*)[ÝýŶŷŸÿỸỹYy].)

I'm needing this to find the word "gay" but if someone writes "gay man" with a space, it doesn't even pickup the word "gay". I'm just trying to figure out why the space allows the word, I tried moving things around and adding what I could that might make sense but nothing seems to click here.

whytheq
  • 34,466
  • 65
  • 172
  • 267
Cake98
  • 7
  • 1
  • 1
    You can exclude it using a negative lookahead `^[GgƓɠḠḡǴǵĜĝǦǧĞğĢģǤǥĠġ][ÂâÅåÀàÁáÃãÄäEeAaÆæ4@][ÝýŶŷŸÿỸỹYy](?! man\b)` https://regex101.com/r/UyIwll/1 – The fourth bird Mar 19 '21 at 16:17

1 Answers1

-1

I want to share this post to you https://stackoverflow.com/a/1732454/4867612

I'm not sure I understood correctly, but with only this [GgƓɠḠḡǴǵĜĝǦǧĞğĢģǤǥĠġ][ÂâÅåÀàÁáÃãÄäEeAaÆæ4@][ÝýŶŷŸÿỸỹYy] in https://regex101.com/r/jYpHJS/1 you can detect if the word gay is in text

Thibaud Av
  • 34
  • 5