xlstatik said:
Hallo,
ist ist possible to search with regexp for all extensions wihtout the
single exception '.dwg'?
Who would this regular expression look like?
Technically, a regular expression will either accept a given input
string, or reject it. It does not do searching in and of itself.
When searching with a regular expression is done, what usually happens
is that a whole bunch of substrings of the so-called "haystack string" are
passed over to the regular expression, and the longest such substring is
returned as the so-called "needle string". The details in the implementation
will alter the behaviour of the program. So for example, you could say "Give
me all non-overlapping substrings of parameter1 which do not contain
'.dwg'", and then pass ".dwg" as parameter1, and the search engine will
return two substrings: {".dw", "g"}, both fo which don't contain ".dwg".
In other words, you'll have to be more specific in your description of
what you want. Do any of these boolean expressions do what you want?
!inputString.endsWith(".dwg")
!inputString.contains(".dwg")
!inputString.equals(".dwg")
- Oliver