Smart Tail - Clever Filtering of Logfile Messages

[Home] [ Download ] [Screenshots] [ Links ] [ Impressum ]
[ Features ] [ Manual ]

FAQ (Frequently Asked Questions)

Content

Regular Expressions

Where do I find a tutorial?
How can I search over all lines?
How do I find the first or last occurrence of a search expression?
Is there a place holder that finds any sign?
How can find text form position A to B with any signs between them?
How can I find text ignoring upper and lower case (case insensitive)?

TODO: Add more content.

Where do I find a tutorial?

Please look at the page links.

How can I search over all lines?

With "(?s)" at the beginning of the regular expression.

How do I find the first or last occurrence of a search expression?

Provided you put "(?s)" at the beginning of your regular expression, because you want to search over more than one line. (Otherwise the search will go over one line only.) With "(?s)" at the beginning the point "." includes a line break.

You are using "<td>.+</td>" as regular expression to find the text of a cell of a table.

".+" finds any signs occurring one or more times (numbers, characters, spaces, tabs, line breaks,...)

The search expression does not find the text of one cell between "<td>" and "</td>". Instead it finds more. It finds text down to the last occurrance of "</td>". This behaviour is called greedy. Hmm, what can you do?

Use "<td>.+?</td>" instead. Watch the additional "?". This behaviour is called reluctant.

Is there a place holder that finds any sign?

- The point "." finds any sign, number, tabs, spaces, characters,...
- ".+" finds any sign occuring at least one ore more times.
- ".*" finds any sign that does not occur at all or one ore more times.

How can find text form position A to B with any signs between them?

Siehe How do I find the first or last occurrence of a search expression?.

How can I find text ignoring upper and lower case (case insensitive)?

Use "(?i)" at the beginning of the regular expression.