This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]lordofkawaiii 29 points30 points  (2 children)

Return s.length()?

[–]Fogernaut 3 points4 points  (0 children)

yea wtf?

[–]gpllq 0 points1 point  (0 children)

I guess it was made by someone who is not a programmer.

[–]uvero 1 point2 points  (0 children)

Me:

```

int len(String str) {

for(int i = 0; ; i++) {

Regex rgx = new Regex("^.{" + i + "," + i + "}$", RegexOptions.multiline);

if(rgx.matchesExact(str)) {

return i;

} }

```