« first day (595 days earlier)      last day (3197 days later) » 

3:08 AM
hi
could anybody help ?

start with '>' , any characters after it. if there is next line it must start with '>' . space doesn't matter in start
 
 
2 hours later…
5:24 AM
@user321 /^(>.+(?:\R(?1))?)$/
If your engine is multiline add (?-m), your fault for not specifying which one.
 
 
5 hours later…
user652649
10:05 AM
morning
 
user652649
10:20 AM
guys how do i write, for example [\p{S}] except the "+" character?
 
user652649
10:39 AM
or "[a-z]" except the "k" letter
 
[^\P{S}+] maybe
and [a-jl-z]
if you want a double negative which is less efficient, use (?!k)[a-z]
assuming you use PCRE, ruby and java has intersecting classes
@Wes
 
user652649
yea pcre
 
user652649
basically i'm checking if a "filename" in a url contains dangerous characters that even if urlencoded could cause issues
 
user652649
so i'm doing "any unicode symbol except # and ?"
 
user652649
because even if %percentencoded could cause problems
 
user652649
10:43 AM
what's my best option?
 
negative lookahead?
(?!.*?[#?])
 
user652649
i'm not good with regexps :P
 
user652649
i need to start from this:
[\p{L}\p{N}\p{M}\p{P}\p{S}\p{Zs}]
 
user652649
but exclude some characters
 
4:07 PM
and.. accepted :D +bounty bonus
1
A: Find match over Array of RegEx in MongoDB Collection

CSᵠDescribing the RegEx (Divide et Impera) would greatly help in limiting the number of Documents needed to be processed. Some ideas in this direction: RegEx accepting length (fixed, min, max) POSIX style character classes ([:alpha:], [:digit:], [:alnum:], etc.) Tree like Document structure (...

 
4:27 PM
0
A: Java Regex to match Vietnamese chars

nhahtdhVietnamese Alphabet The intersection of the Vietnamese alphabet and English alphabet (i.e. whatever that is common between the 2 alphabets) is the alphabet of English minus f, j, w and z. In Vietnamese, a, e, i, o, u, y are considered vowels. Apart from those, Vietnamese also use several other...

Technique can be applied to other Latin-based languages with diacritics
 
@CSᵠ Well done! :D You now have more rep than I!
 
@Unihedron lol, i forgot about rep for quite some time
i'd like 10k to see the damn deleted q's
 
lol there's lots of spam to see
 
It has been a while since I write something practical
and not craps like extract info from HTML or validate some password or extract data from some format where lib is available
 
4:42 PM
@nhahtdh dude i have't even read half of the monster post and it's awesome!!
great job
 
@nhahtdh the accepted answer sucks
 
It took me hours to write my answer
It should be easier in Perl, I think?
 
it needs exposure
really... the crap that gets answered and voted, ugh, most should be deleted
 
Add it under our colloquial thread
 
we are a really small community
 
4:47 PM
It would help if someone with real experience can comment on my answer - like tchrist or someone who has deal with Unicode and its quirks
 
everybody just comes and wants a regex
 
@nhahtdh My mind melted.
 
I only really learn about Unicode's quirks after participating on SO, also about the dates and all the subtleties around it
 
I really only joined SO to clean up the bad questions... lol
 
@nhahtdh when i first saw the question i thought something along these lines: regex101.com/r/nY5cN8/1
 
4:52 PM
It will match all kinds of s*** from other languages
 
yea
ohh well, a combo class
and some other stuff
 
One of you should just run for mod, become a mod and berserk through the [regex] tag.
 
I'd delete around 99% of the questions, leaving only the ones with good answer behind
 
i'm too low in points
but questions with over 3months and less than 50 views are cleary one-offs
just check for that, prolly will be what @nhahtdh sais thate near 99%
 
I'm subscribed to the [regex] tag emails, every day I get a newsletter of new regex questions, and every day I sift through
every one of them
 
4:57 PM
funk !
dude
you! should run 4 mod
 
answered by certain few high-rep users with poor answers with no useful description whatsoever, only to find a good post to read every once in two weeks
 
dedication
 
Anything good lately, out of the craps?
 
pff
 
in Teenage Programmers Chatroom, 6 hours ago, by Unihedron
I am, however, the 2nd most active Stack Overflow user: http://stackoverflow.com/users?tab=participation
 
4:58 PM
sometimes crappy questions receive great answers
 
Picture for posterity:
And feel free to go through this query and close all the questions that doesn't have a good answer: data.stackexchange.com/stackoverflow/query/224112/…
 
Isn't there a counter when you visit the list of question tagged with regex?
On the bottom right corner of the description box
 
It leads you to the close vote review queue, where posts are ordered by amount of reviews taken, and there are audits
SEDE doesn't put you through all that, you see the convincing stats without going to the question already
 
cool
there's a bunch i can close right away
:D
 
For example, this on the top really sucks, stackoverflow.com/q/24477879/3622940
 
5:03 PM
skipped one, tl;dr
can't just close like the herd...
must... be... fair...
 
NEVER MIND. I'VE SOLVED IT. — Testtest Testtester Jun 29 at 22:26
sings the fair closing song
 
cool, i need 2 more votes and i get the 5k
whoo hoo
i have about 6k in all SE :P
 
network flair?
 
yeah
 
5.9k :(
You win
 
5:05 PM
i wasn't competing :))
 
Well then, I was going to give you a cookie
@nhahtdh I'm stopped watching the active tab, best one in a while had to be Sam's javascript thing
 
@Unihedron: Link please
 
@Unihedron umm.... is there milk with taht cookie?
i might want it then :)))
 
If you like theoretical regex
6
A: Regular Expressions with repeated characters

nhahtdhUsually for this type of question, if the regex is not simple enough to be derived directly, you can start from drawing a DFA and derive a regex from there. You should be able to derive the following DFA. q1, q2, q3, q4 are end states, with q1 also being the start state. q5 is the failed/trap st...

Write a regex with alphabet x, y, z, and 2 adjacent characters must not be the same, with only concat, alternation, * and group
 
Wow! Great! Old but golden
15
A: How to extract an optional query parameter using regex in Javascript

SamThe Answer Screw your hard work, I just want the answer! Okay, here you go... var regex = /^path(?:(?=\?)(?:[?&]foo=(\d*)(?=[&#]|$)|(?![?&]foo=)[^#])+)?(?=#|$)/, URIs = [ 'path', // valid! 'pathbreak', // invalid path 'path?foo=123', // valid! 'path?foo=-123', // negative 'invalid?foo=1', // invalid path 'path?foo=123&bar=abc', // valid! 'path?bar=abc&foo=123', // valid! 'path?bar=foo', // valid! 'path?foo', // valid! 'path#anchor', // valid! 'path#foo=bar', // valid! 'path?foo=123#bar', // valid! 'path?foo=123abc', // not an integer ]; for(var i = 0; i < URIs.length; i++) { var URI = URIs[i], match = regex.exec(URI); if(match) { var foo = match[1] ? match[1] : 'null'; ...

 
5:18 PM
!!s/[ow]{3}/Amazing/i
 
@CSᵠ No I'm saying stop fucking telling kids it's some crazy mess and making it seem sAmazing hard. (source)
 
ohh well
 
6:10 PM
Burnination, brb
 
 
3 hours later…
8:53 PM
Ok I have completely lost my mind today, does this look correct to match a range from 0 to 600
([0-9]{1,2}|[1-5][0-9]{2}|600)
ping @HamZa
 
@hwnd small problem
00 is wrong
 
Yes I see
 
that's all i see
but boundaries
 
9:28 PM
but [1-9]{2} will not match 20...
A little bit of cheating regex101.com/r/uA9bW3/3
How it should look like regex101.com/r/uA9bW3/4
 

« first day (595 days earlier)      last day (3197 days later) »