- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
To match specific word in regex, use use regular expression.
Following is the code −
To run the above program, you need to use the following command −
Here, my file name is demo308.js.
This will produce the following output −
- How to match word characters using Java RegEx?
- How to match word boundaries using Java RegEx?
- How to match non-word boundaries using Java RegEx?
- How to match a non-word character using Java RegEx?
- How to match a line not containing a word in Java Regex
- Significance of regex match() and regex search() function in Python
- REGEX Match integers 6 through 10 in MySQL?
- Match all occurrences of a regex in Java
- Regex to match lines containing multiple strings in Java
- ORDER BY a specific word in MySQL
- How to match any character using Java RegEx
- Regex to ignore a specific character in MongoDB?
- Extracting each word from a string using Regex in Java