• +91 9723535972
  • info@interviewmaterial.com

Regular Expressions Interview Questions and Answers

Question -
How to negate specific word in regex?



Answer -

We can negate word in regex by using the following code:
^(?!.*bar).*$

The negative lookahead construct is the pair of parentheses.

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners