regex


Regexp: match and exclude


In this list:
image_1.png
image_1_small.png
image_2.png
image_2_small.png
image_three.png
image_three_small.png
antoher_image.png
I would like to match only those images that BEGIN with the word image BUT do not contain the word small.
The regex should then return:
image_1.png
image_2.png
image_three.png
So far I have:
/^image(?!.*small)/m
I tested this with your single lines from the list
^image(?!.*_small.*).*\.png$
see also this discussion on how to exclude keywords in regex

Related Links

Eclipse Add text to first line of all files
Renaming files by using a prefix from text file
Python regex to find words, which also excludes particular words
Regex - exclude search results
Update a line in the AD info field
Sed Match Number followed by string and return Number
Perl matching string with mix of alphanumeric,_ and any number of square braces [closed]
Bash: extract the scheme and host part from a URL string
RexExp find a word within a list of words that are within a parenthesis
Converting EBNF to Regular Expression
Regex rule - allow empty field or special format [duplicate]
Using powershell to search for a pattern
Check odd number of a certain character
Regex: unexpected double replacement [duplicate]
How do I use the sed command to remove all but the first three characters in a line?
“OR” operator in regex, in express routing

Categories

HOME
elastic-beanstalk
wpf
dynamic-programming
selenium
redirect
opencl
apt-get
youtube
fonts
typeahead.js
arm
antlr
vsix
restsharp
google-adwords
r-caret
overloading
bluej
cobol
vulkan
installer
amadeus
durandal-2.0
abaqus
freetype
contains
advantage-database-server
opencms
centroid
aikau
mouseevent
robotium
paket
monads
popupwindow
skyscanner
sqlite.swift
background-process
machine-language
vrtk
inria-spoon
msal
json-rpc
angular-xeditable
joe-editor
caldroid
rft
uitabbarcontroller
es6-promise
message-hub
pulseaudio
ewsjavaapi
stroke
replaygain
soql
manual
jawr
netbeans-7
turbo-c
itamae
django-errors
mailcore2
ipopt
statistics-bootstrap
printscreen
facebook-audience-network
xnamespace
selenium2library
google-api-ruby-client
dnx
document-ready
database-tuning-advisor
symbian
heroku-toolbelt
ppl
crowdflower
min3d
esx
citymaps
mui
deepzoom
yourls
magic-unipaas
disk-io
cfile
inputview
sshj
ioerror
jflow
google-chrome-frame
sizzle
cakephp-2.1
doophp
websolr
textboxlist
jtemplates
hunchentoot
wiki-markup
system-tray
winamp
myisam
excel-web-query
xml-database
utility
drwatson
nhaml

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App