Jump to content

regex, check if string does not exist


jeff205

Recommended Posts

I found that a negative look behind is ?<! and a negative look ahead is ?!, but I can't find the right way to implement them into my code.

/(?<!\[(code|html|css|javascript|php|gml)\])(.*)(\[b\])(.+)(\[\/b\])(.*)(?!\[\/\\2\])/Usi

I've tried this, and few other ways, but I none of them have works, does anyone know how I could correctly implement them to check if there is not a code tag before, and there is not a /code tag after?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.