Tuesday 25 July 2023

Regular Expression For Exclusion

 Regular expression for exclusion

Regular expression can be applied for excluding certain words - 

1. Use (?!<word to be excluded>)

2. (?i) to make cases insensitive

Example - discarded and template to be excluded where (?i) indicates being case insensitive

(?i)(?!.*discarded.*)(?!.*template.*)(.*ubicell.*) 

No comments:

Post a Comment