- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Java Regular Expression to match a line that doesn't contain a word.
public class RegTest { public static void main(String[] args) { // TODO Auto-generated method stub String s="tutorials"; boolean i=s.matches("^((?!kk).)*$"); System.out.println(i); } returns true, if word does not match character kk }
- Related Articles
- Java Regular Expression that doesn't contain a certain String.
- How to match a word in python using Regular Expression?
- MongoDB regular expression to match a specific record?
- How to match a regular expression against a string?
- How to match a line not containing a word in Java Regex
- Why milk doesn't contain Vitamin C?
- Program to match vowels in a string using regular expression in Java
- How to match digits using Java Regular Expression (RegEx)
- How to use regular expression in Java to pattern match?
- How to match non-digits using Java Regular Expression (RegEx)
- How to match bold fields in a HTML script using a regular expression in Java?
- How to match a whitespace in python using Regular Expression?
- How to match anything except space and new line using Python regular expression?
- How to extract each (English) word from a string using regular expression in Java?
- How to query an Array[String] for a Regular Expression match?

Advertisements