help using find / search for multiple words
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
help using find / search for multiple words
I can't seem to find 2 separate string of characters.
How do I do this? can some one help please?
I need to search for
inbound
10.104.8.140
I tried
"inbound" "10.104.8.140"
\inbound\ \10.104.8.140\
Thanks in advance
How do I do this? can some one help please?
I need to search for
inbound
10.104.8.140
I tried
"inbound" "10.104.8.140"
\inbound\ \10.104.8.140\
Thanks in advance
To Me or Not To Me
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm
Do you mean you want to find either inbound or 10.104.8.140?
This will do that:
This will do that:
This assumes you are using Posix regular expression syntax:Find what: inbound|10.104.8.140
[X] Regular expression
Configure | Preferences | Editor
[X] Use POSIX regular expression syntax
Last edited by ben_josephs on Tue Feb 12, 2008 11:43 pm, edited 1 time in total.
Need to find them both on the same line
Ben not or, AND
I need to find them both on the same line.
Going through the syslogs and I I can find single items but not both on the same line
I need to find them both on the same line.
Going through the syslogs and I I can find single items but not both on the same line
To Me or Not To Me
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm
Thanks Ben that worked
Thank you very much Ben, that worked!
all I needed was this part
inbound.*10.104.8.140
So the dot . is the (and separator), and the * asterics is the wild card to search for and match subsequent string.
Funny how I looked that up in the Help file and it doesn't show it.
I think I'll enter it as a feature request.
Thanks again,
all I needed was this part
inbound.*10.104.8.140
So the dot . is the (and separator), and the * asterics is the wild card to search for and match subsequent string.
Funny how I looked that up in the Help file and it doesn't show it.
I think I'll enter it as a feature request.
Thanks again,
To Me or Not To Me
- Bob Hansen
- Posts: 1516
- Joined: Sun Mar 02, 2003 8:15 pm
- Location: Salem, NH
- Contact:
Check the Help file again, look for How to Use Regular Expressions.
The dot is not a separator, it is actually the wild card, stands for any character.
And the * is for any number of the wildcard characters.
The "|" is the OR character.
So this is looking for any number of characters in between the two strings.
And the OR symbol is allowing the strings to come in either sequence.
The dot is not a separator, it is actually the wild card, stands for any character.
And the * is for any number of the wildcard characters.
The "|" is the OR character.
So this is looking for any number of characters in between the two strings.
And the OR symbol is allowing the strings to come in either sequence.
Hope this was helpful.............good luck,
Bob
Bob
Thanks Bob
Ok, Thanks Bob for answering that and clearing that up.
per your suggestion, I went back to check the help file again,
and no where does it give such example or explanation.
the version I have is 5.0.3
I think something so basic should be put in the help file.
I did put it in for a feature request for this today, if you check in the
"Enhancement Suggestions"
or maybe it was added in a newer Rev than mine.
Thanks again
per your suggestion, I went back to check the help file again,
and no where does it give such example or explanation.
the version I have is 5.0.3
I think something so basic should be put in the help file.
I did put it in for a feature request for this today, if you check in the
"Enhancement Suggestions"
or maybe it was added in a newer Rev than mine.
Thanks again
To Me or Not To Me
- Bob Hansen
- Posts: 1516
- Joined: Sun Mar 02, 2003 8:15 pm
- Location: Salem, NH
- Contact:
- Bob Hansen
- Posts: 1516
- Joined: Sun Mar 02, 2003 8:15 pm
- Location: Salem, NH
- Contact:
Hi trangen ....
I am really trying to help here, so please do not take my comments as criticism. The use of .* is more complex.
But disneyland.*california will not be limited to the words disneyland and california. It would also find disneylandworld followed by northerncalifornia or any other situations that include disneyland and california in a larger string
California might not be a good example. But, if you wanted the word "the" and "car", using the.*car would get words like them, these, heathen, cartoon, racecar, Carl, carpet, etc.
And the.*|.*car would do the same, only in an OR situation vs. a sequential one.
To get just the exact words, the RegEx needs to be more complex, defining words, and/or inserting space characters, the number of characters, etc. Your original search, inbound.*10.104.8.140 will also locate the two additional IPs of 110 and 210.104.8.140
I am really trying to help here, so please do not take my comments as criticism. The use of .* is more complex.
But disneyland.*california will not be limited to the words disneyland and california. It would also find disneylandworld followed by northerncalifornia or any other situations that include disneyland and california in a larger string
California might not be a good example. But, if you wanted the word "the" and "car", using the.*car would get words like them, these, heathen, cartoon, racecar, Carl, carpet, etc.
And the.*|.*car would do the same, only in an OR situation vs. a sequential one.
To get just the exact words, the RegEx needs to be more complex, defining words, and/or inserting space characters, the number of characters, etc. Your original search, inbound.*10.104.8.140 will also locate the two additional IPs of 110 and 210.104.8.140
Hope this was helpful.............good luck,
Bob
Bob
- Bob Hansen
- Posts: 1516
- Joined: Sun Mar 02, 2003 8:15 pm
- Location: Salem, NH
- Contact:
one last questions please
ok, since were on the subject.
How do I do this please?
how do I run 2 searches at the same time.
E.g.
I want to find:
inbound.*10.104.8.140
inbound.*10.104.9.17
I want to find ALL lines that have either inbound.*10.104.8.140 and
inbound.*10.104.9.17
I know they will BOTH NOT be on the same line.
they will be on separate lines.
How do I do this please?
how do I run 2 searches at the same time.
E.g.
I want to find:
inbound.*10.104.8.140
inbound.*10.104.9.17
I want to find ALL lines that have either inbound.*10.104.8.140 and
inbound.*10.104.9.17
I know they will BOTH NOT be on the same line.
they will be on separate lines.
To Me or Not To Me
- Bob Hansen
- Posts: 1516
- Joined: Sun Mar 02, 2003 8:15 pm
- Location: Salem, NH
- Contact:
Find what: (inbound.*( |0)10.104.8.140)|(inbound.*( |0)10.104.9.17)
This assumes that "inbound" is always before the IP address on the lines.
This will select strings that include "inbound" and the IPs, it is not limited to those specific words/IPs. See my earlier post.
There is a leading space char or a zero in front of the IPs to prevent 110 and 210 addresses from being selected. But, this does require a space or a zero for a match. Any other char will not match.
==============================
Open Find Window, use the following settings:
-----------------------------------------
[X] Regular expression
Mark All
-----------------------------------------
Configure | Preferences | Editor
[X] Use POSIX regular expression syntax
-----------------------------------------
This assumes that "inbound" is always before the IP address on the lines.
This will select strings that include "inbound" and the IPs, it is not limited to those specific words/IPs. See my earlier post.
There is a leading space char or a zero in front of the IPs to prevent 110 and 210 addresses from being selected. But, this does require a space or a zero for a match. Any other char will not match.
==============================
Open Find Window, use the following settings:
-----------------------------------------
[X] Regular expression
Mark All
-----------------------------------------
Configure | Preferences | Editor
[X] Use POSIX regular expression syntax
-----------------------------------------
Hope this was helpful.............good luck,
Bob
Bob
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm