« first day (774 days earlier)      last day (3018 days later) » 

3:15 AM
Hmm... Just get review ban >_<
Next time I'm going to run an audit detection script...
 
 
5 hours later…
8:39 AM
lol
 
@nhahtdh :O
so sorry
 
 
2 hours later…
10:21 AM
I'm quite sure this standard is for POSIX BRE and ERE, and it has nothing to do with Java regex. Java doesn't even claim to support ERE or BRE! If anything, Unicode Regular Expression unicode.org/reports/tr18 should be cited here. — nhahtdh 2 mins ago
Not sure if we can get a mod to delete this: stackoverflow.com/a/18958937/1400768
 
Might want to make an MSO post... Those upvotes are a huge resistance to getting it deleted...
 
10:59 AM
in Tavern on the Meta on Meta Stack Exchange Chat, 44 secs ago, by Infinite Recursion
@Unihedro Mods are not for deleting answers with 100+ score just because one user says it's technically incorrect. Downvote incorrect answers, don't call the mods.
 
@Unihedro Like anyone is going to know that it is incorrect
 
@nhahtdh That's kind of the point. Not even a mod will know if it's incorrect, so flagging isn't effective.
 
11:29 AM
0
A: How does {m}{n} ("exactly n times" twice) work?

nhahtdhCompiled structure of the regex Kobi's answer is spot on about the behavior of Java regex (Sun/Oracle implementation) for the case "^\\d{1}{2}$", or "{1}". Below is the internal compiled structure of "^\\d{1}{2}$": ^\d{1}{2}$ Begin. \A or default ^ Curly. Greedy quantifier {1,1} Ctype. POSIX...

 
 
2 hours later…
1:13 PM
Quiz time. Which ones of these regexes compiles in Java:
A. "(?<=.*a)"
B. "(?<=a.*)"
C. "(?<=.*a.*)"
D. "(?<=.*a.*.*)"
E. "(?<=.*)"
F. "(?<=.*..*..*..*..*)"
 
Frustated
My ADHD is not letting me understand the Regexes..
 
1:49 PM
@nhahtdh A, E, F?
 
2:00 PM
yeah I'm with Unihedro on this one, although E is the only one I'm sure about.
 
@Unihedro How did you master Regular Expressions ?
@Unihedro Can one learn Regex from the Official documentation ?
 
@MartinBüttner The Java regex engine compiles the obvious maximum length and uses that as a flag for the lookahead, so B, C, and D already won't compile.
@CodeGeek That's not the official documentation. That's only the Java tutorials.
I recommend the book Mastering Regular Expressions by O'reilly.
 
Oh ok Can we learn alone only with that ?
 
@CodeGeek this helped a lot (and the book Unihedro recommended)
 
@CodeGeek no unless Java regexes are all you're going to do, which is a rotten idea
 
2:10 PM
@Unihedro So how much time did it take for you to learn about them ?
 
Twenty years.
I'm 16.
 
What ? Are you kidding ?
 
@CodeGeek It really depends how much time you invest. You can easily get fairly good within a week if you spend a fair amount of time learning and putting it to use. Most of the concepts are really not that difficult.
 
In case you expected a more serious answer of some description, it didn't take long at all. Five seconds, actually. And I can teach you regex in five seconds.
 
or that ^
 
2:14 PM
Regex stands for regular expressions. They are forms to match or replace under a set syntax. For example, "cat" matches the last three characters of "concat".
Congrats you now know regex.
Just like vim has fancy commands, regex has fancy constructs. Read them up here:
52
Q: Reference - What does this regex mean?

HamZaWhat is this? This is a collection of common Q&A. This is also a Community Wiki, so everyone is invited to participate in maintaining it. Why is this? regex is suffering from give me ze code type of questions and poor answers with no explanation. This reference is meant to provide links to qua...

For example, you can replace with "[a-c]a" in "aabacada" to "x" and get "xxxda".
That pair of square parenthesis denotes a character class, simple.
There are also shorthands, such as \d (digit) -> [0-9]. So replacing \d in 12a3 into x gives xxax.
 
Oh thanks a lot both of you..
Sorry if you were irritated by me
 
 
3 hours later…
5:18 PM
@Unihedro @MartinBüttner It's not a very good question, since it asks about an aspect Java is buggy. However, on Java 7, all of them compiles, except for B ideone.com/CLZXsK
 
your code is broken
the compile at B throws an exception, the rest of the compile sessions terminate to reach the catchclause
This only proves that A compiles and that B doesn't.
 
@Unihedro I specifically place B at the end
 
oh, really?
...
walks away slowly in shame
 
It is due to a bunch of integer overflow magic during the check to assign info.maxValid to false
Btw, info.maxValid is the only condition used to check if a look-behind is valid or not, after studying the pattern inside the look-behind
 
O_o
 
5:30 PM
(If you are really interested, you should look at source code Pattern$Curly.study())
 

« first day (774 days earlier)      last day (3018 days later) »