I want to see just a couple of words in logcat. In other words, just a given tags. I tried to enable Regex and type [Encoder|Decoder]
as filter, but it doesn't work.
regexp,AndroidStudio,logcat. Logcat provides several default filter options (Verbose, Info, Debug etc) and a simple pattern match filter, but the regex filter is the most powerful option for customizing logcat output.
And other option is Right click on Logcat tab and then enable Floating mode. Then just resize the floating window so that the Logcat search can expand. Edit: You can also use CTRL+F to filter logcat. It will open new search bar and then you can try on that.
You should use a grouping construct:
(Encoder|Decoder)
Actually, you can just use
Encoder|Decoder
If you use [Encoder|Decoder]
, the character class is created that matches any single character E
, n
, c
... |
, D
... or r
.
See Character Classes or Character Sets:
With a "character class", also called "character set", you can tell the regex engine to match only one out of several characters. Simply place the characters you want to match between square brackets. If you want to match an
a
or ane
, use[ae]
.
Another must-read is certainly Alternation with The Vertical Bar or Pipe Symbol:
If you want to search for the literal text
cat
ordog
, separate both options with a vertical bar or pipe symbol:cat|dog
. If you want more options, simply expand the list:cat|dog|mouse|fish
.
When using (...)
you tell the regex engine to group sequences of characters/subpatterns (with capturing ones, the submatches are stored in the memory buffer and you can access them via backreferences, and with non-capturing (?:...)
you only group the subpatterns):
By placing part of a regular expression inside round brackets or parentheses, you can group that part of the regular expression together. This allows you to apply a quantifier to the entire group or to restrict alternation to part of the regex.
you can just use Encoder|Decoder
and must check Regex CheckBox too
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With