« first day (599 days earlier)      last day (3193 days later) » 

8:47 AM
CSᵠ has made a change to the feeds posted into this room
CSᵠ has stopped a feed from being posted into this room
 
You should create a sandbox room for testing stuff like that @CSᵠ :P
 
what @Unihedron
 
feeds
 
i actually managed them
added a new one
removed another
 
Oh, I assumed you were messing with feeds.
 
8:51 AM
btw, feel free to add nice feeds, possibly related at least
 
When I start my own blog I could set up the #regex ones feeds to post here, sure :)
2
 
hehe @Unihedron you're really striving to be on-topic :)
@Unihedron star 1st, then applaud you for the intention :)
 
@CSᵠ Wow, that's great, I hope browsers update to support that standard anytime soon.
Internet Explorer, I'm looking at you.
 
lol
look away
FAST
there's no hope for IE
let it die, please!
 
:)
For Halloween I was going to wear some costume with "IE 4 rules" written on it. It would be dead scary for sure.
 
8:55 AM
@Unihedron can you also pin the unicode starred msg
 
Instead I simply didn't show up.
@CSᵠ I starred it.
 
+pin
 
Done
 
cool
ossm
 
9:16 AM
@CSᵠ nice
 
make some sense out of this: codepad.org/pfO3N3eY --- (source)
-
 
@CSᵠ interesting
 
396 - 8 = 388 pieces
 
10:03 AM
Meta is great. Allow me to promote my answer...
0
A: Should good information be posted as an answer or comment?

UnihedronShould good information be posted as an answer or comment? This is kind of subjective and is difficult to account for a objective viewpoint without riding a tour through the pros and cons of such information being posted within those mediums. So let's do that! Why are good information posted as...

 
10:14 AM
there you go
shameful promotion works
 
 
1 hour later…
11:31 AM
@CSᵠ the last part doesn't make sense to me "Their inverse counterparts \d, \s, and \w are not affected by the u flag as per the latest ES6 draft spec, but there is a proposal to make \d and \w more Unicode-aware."
"Yep — when the i and u flags are set, \W is no longer the inverse of \w."
lolwut
 
lolwhat
 
 
1 hour later…
12:43 PM
exactly my reaction...
I hope this gets fixed...
 
 
2 hours later…
2:40 PM
 
3:09 PM
amateurs ^
 
3:33 PM
Hey everyone
I'm hoping someone can help me with a regex
I'm new to regex, the solution I'm looking for is pretty straight forward though
 
You're in luck, I'm still online. Bring it.
 
k so...
I'm doing a search and replace
so I need to find the entire line to replace it with a new line
 
What's the problem?
 
I'm using regex to find that line that I'm going to replace
 
Yeah?
 
3:35 PM
the convention goes like this....
part_1: "string of text \n"
 
So what's the problem?
 
so I want to grab part_1 AND the remainder of the line
only for that line though
but...
 
wrtoruwgharwughaeghaetoughaeth
ehaetouhaei string of text\nWRGOUGR
ghaughetaiuhaetouhoaeuthoetuhazeo
rgaetouhaetouaeth
wrtoruwgharwughaeghaetoughaeth
ehaetouhaei
ghaughetaiuhaetouhoaeuthoetuhazeo
rgaetouhaetouaeth
am I understanding correctly?
 
there are multiple part_1's in the file
I only want to replace the part_1 that is nested underneath the words "implied"
thats where it gets tricky actually
 
So what's the problem?
 
3:37 PM
I have no idea how to search and replace the correct part_1
the one that is nested below "implied"
 
What's nesting?
 
one sec I'll post a gist
 
Please do. :)
 
so I need to search and replace part_1, part_2, part_3, and part_4
but ONLY when they are nested below "implied"
 
Eh, life would had been easier if you'd just tell me it was in YAML format.
Which regex engine / implementation are you using?
 
3:40 PM
heh!
it is in YAML
i'm using Ruby
was gonna do something along the lines of gsub(/search_regexp/, "Replacement string")
another option is I can search and replace the entire thing, starting from implied and ending at part 4
instead of the individual parts. I guess it would be alot easier to just replace the entire thing
 
Eh. How do you tell the regex you want the four parts instead of the header? Do you like know they're below text or they start with part_ or something?
 
I just updated the gist
so when I do the search and replace I can replace the header as well
so it's okay if the regex grabs "implied" and everything else below it
 
Ok, so you want everything under the "implied" row, and no more?
implied:
  header: "About all the cool stuff on this site:"
  text:
    part_1: "Our site has lots of cool stuff."
    part_2: "Read more about us"
    part_3: "here"
    part_4: "."
rawr
 
yup, exactly
 
So implied to dot?
 
3:47 PM
yup!
ahhh wait!
there's a part_5
that I'm overwriting completely
 
Without "implied" itself?
 
no, I'm including implied
 
gotcha
 
however, part_4 and part_5 will not always be a dot
its going to be a sentence
the naming convention of part_5 will always be there though
thats the very last row
so "part_5: a bunch of other stuff that will be different in each case"
 
Since this is YAML I'm just going to work this with the indentation.
 
3:50 PM
kk
yeah that works
 
We're going to find the start of line, reach implied, and capture the spaces used.
 
yup!
 
Then from that point onwards, we check for that amount of spaces in front of line and assert more spaces, until the assertion fails. Then the nested level ends.
If you want the colon, add it after "implied".
 
awesome
but when I read the file into my terminal
it's a string
no longer a YAML
 
It's ruby, so it shouldn't matter. Oh wait, add m modifier.
It's the last box, after the pattern.
 
3:54 PM
the text after part_1, part_2 will be in different languages
will does affect the regex?
 
I'll sketch you a picture so you get to see how it works.
 
thanks!
 
The first section (outside the (?:)+ group) captures spaces (purple group) and fetches "implied".
Then is advances to the next line, assert that this line has more spaces than the above line, and matches the rest of it.
Rinse and repeat until the line doesn't have more spaces, then it means we're out of the indented block.
 
 
2 hours later…
6:09 PM
just got back from lunch, taking a look at this now
thanks so much!
 
6:21 PM
but if you're dealing with a string aren't the indentations gone?
there's no "\t" in the string
its just blank space
 
6:39 PM
wow, activity
 
Haha
@CSᵠ I fixed the menu, I switched over to using bootstrap
 
let's see
@hwnd link please
 
Ill link you to it in awhile, I need to upload it to the server still.
 
@hwnd text size is ok, but i have no hover menu
 
Yea I am rebuilding it
 
btw, i don't like lengthy hover menus
 
No, it wont be ill show you an example
@CSᵠ Ok reload it.
 
ossm
 
 
2 hours later…
9:01 PM
this looks interesting
 
 
2 hours later…
11:08 PM
@CSᵠ not really
 
@Unihedron well.. it's something in JS, rather than ECMAscript's RegEx...
 
@CSᵠ What's that?
 
@Unihedron what do you mean? can't see it?
 
Huh?
 
i don't follow
 
11:12 PM
 
11:23 PM
umm
you can't see the data.se query?
 
I can, what's it for?
 
i've linked the editable one, not sure if it shows for you
it's an improvement on yours
 
Too many false positives.
 
accepts more "what have you tried" variants
+thanks
i guess thanks is also obsolete
 
No, hardly.
 
11:24 PM
it's not?
 
Thanks, but how to add 5 to variable x?
Thank you but I don't understand then code.
 
what about Thank you, this solves it!
or just plain Thank you
?
 
First, you'll never see plain Thank you because comments has character minimum limits.
 
anyway, dude, you're very rigid :)
 
And there's nothing wrong with "Thank you, this solves it!" or "This works for me" comments.
 
11:27 PM
ok then
 
btw... got 5K
 
gZ
you can now... review tag edits
 

« first day (599 days earlier)      last day (3193 days later) »