FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
JavaRepository/ivanchuk/src/task20/Task20.java at master · karzhouAndrew/JavaRepository · GitHub
karzhouAndrew
/
JavaRepository
Public
Notifications
You must be signed in to change notification settings
Fork
16
Star
0
Code
Issues
0
Pull requests
96
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
JavaRepository
/
ivanchuk
/
src
/
task20
/
Task20.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
18 lines (15 loc) · 558 Bytes
Breadcrumbs
JavaRepository
/
ivanchuk
/
src
/
task20
/
Task20.java
Copy path
File metadata and controls
18 lines (15 loc) · 558 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
package
task20
;
import
java
.
util
.
regex
.
Matcher
;
import
java
.
util
.
regex
.
Pattern
;
public
class
Task20
{
private
static
final
String
PATTERN_OF_HEXADECIMAL
=
"0[xX][
\\
dA-Fa-f]+"
;
public
static
StringBuilder
searchOfHexadecimalNumbers
(
String
text
) {
StringBuilder
numbers
=
new
StringBuilder
();
Pattern
pattern
=
Pattern
.
compile
(
PATTERN_OF_HEXADECIMAL
);
Matcher
matcher
=
pattern
.
matcher
(
text
);
while
(
matcher
.
find
()) {
numbers
.
append
(
matcher
.
group
()).
append
(
" "
);
}
return
numbers
;
}
}
Back
|
FazBrowse Home
|
New Git URL