Link to home
Start Free TrialLog in
Avatar of Gula
GulaFlag for United States of America

asked on

Phyton Regular Expression help, pls

Need help writing a regular expression:

I need a regexp to match a URL, so I need to include all URLs that have a 'hello' in them and exclude all URLs that have 'bye' in them, in other words,
need a regexp that matches .*hello.* but does not match .*bye.*

NOTE: I replaced the super-secret  words with 'hello' and 'bye' ;)
I promise this is not a homework, I just suck with Regular Expressions and could not find online the exclude pattern
Thanks!
ASKER CERTIFIED SOLUTION
Avatar of Gula
Gula
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial