Stack Exchange
Stack Overflow
Questions
Tags
Users
About
Stack Overflow
Public
Questions
Tags
Users
About
/.../ What does this Ruby regex mean?
Asked
Jan 31 '15 at 20:38
Active
Jan 31 '15 at 20:41
Viewed
58 times
-5
What does this Ruby regex mean?
/.../
ruby
regex
asked Jan 31 '15 at 20:38
Alex Chin
1,642
15
28
The dot `.` matches _any single character_, so that regex matches any 3 characters.
–
Michael Berkowski
Jan 31 '15 at 20:40
And it doesn't have to be exactly a 3 character string either, because it isn't `^$` anchored. It just has to be any string at least 3 characters long.
–
Michael Berkowski
Jan 31 '15 at 20:41
1 Answers
1
1
This regex matches any three characters.
answered Jan 31 '15 at 20:41
MikeWu
3,042
2
19
27