FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
JavaExercises/Experiments/SearchUsingRegExp.java at master · biblelamp/JavaExercises · GitHub
biblelamp
/
JavaExercises
Public
Notifications
You must be signed in to change notification settings
Fork
130
Star
153
Code
Issues
1
Pull requests
9
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
JavaExercises
/
Experiments
/
SearchUsingRegExp.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
28 lines (25 loc) · 649 Bytes
Breadcrumbs
JavaExercises
/
Experiments
/
SearchUsingRegExp.java
Copy path
File metadata and controls
28 lines (25 loc) · 649 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/**
* Java. Using search with regexp
*
* @see http://stackoverflow.com/questions/20050302/regex-match-two-words
*
* @author Sergey Iryupin
* @version 0.1 dated Apr 3, 2017
*/
import
java
.
util
.
regex
.*;
class
SearchUsingRegExp
{
static
final
String
[]
msgs
= {
"êàê äåëà"
,
"êàê òâîè äåëà"
,
"êîòîðûé ÷àñ"
,
"êàê òû òàê ìîæåøü"
,
"êàêäåëà"
};
public
static
void
main
(
String
[]
args
) {
Pattern
pattern
=
Pattern
.
compile
(
"êàê
\\
s.*äåëà"
);
for
(
String
str
:
msgs
) {
Matcher
matcher
=
pattern
.
matcher
(
str
);
System
.
out
.
println
(
matcher
.
find
());
}
}
}
Back
|
FazBrowse Home
|
New Git URL