Lookforward and Lookbehind When Using Regular Expressions
Regular expressions are a great tool for identifying strings. There are some special cases called ‚lookahead’ and ‚lookbehind’, that are described below:
Lookahead
The current position is followed by “test”:
(?=test)
Lookbehind
“test” is before the current position:
(?<=test)
Negative Lookahead
The current position is not followed by “test”:
(?!test)
Negative Lookbehind
“test” is not before the current position:
(?<!test)
Related Posts
- Add self hosted Google Fonts to your Laravel App
- Tutorial: Ubuntu 18.04 LAMP Setup for WordPress
- Install Sentry on Ubuntu 18.04 Using Nginx and Let's Encrypt Certificates
- Use Google Fonts Locally With GeneratePress
- Fix Linux File And Folder Permissions When Using Laravel Forge
- Change Keyboard Layout When Using Ubuntu
- Add Fontawesome Pro to Your Laravel Project Using Npm