<AndreYuhai>
So maybe the best approach is like you mentioned, strip out what I know and then use the rest as address
crankharder has joined #ruby
<adam12>
AndreYuhai: What about cities with spaces in them?
<AndreYuhai>
adam12, in this case there's only one city with space which is SOCIAL CIRCLE
<AndreYuhai>
at least that's what I'm told :D
<adam12>
Ah!
<AndreYuhai>
and the state is always GA
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Read error: Connection reset by peer]
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Read error: Connection reset by peer]
Swyper has quit [Remote host closed the connection]
<adam12>
AndreYuhai: Maybe two-pass regexp or something with StringScanner.
andremedeiros has quit [Read error: Connection reset by peer]
<AndreYuhai>
What's two pass regexp
<AndreYuhai>
What I did is basically strip out whatever I've found and then take the rest as the address
<adam12>
AndreYuhai: Regexp what you know, then slice it out of the string. Then regexp the remainder to see if you can get city out of address.
<AndreYuhai>
Oh okay
<adam12>
ie. state and zip is super easy, obviously. Once you have that, you could anchor to the end of the string to extract the city (since only one has a space in it LOL). Then you’d have the address.
andremedeiros has joined #ruby
<AndreYuhai>
adam12, Thanks I actually included the city in the first regexp as well as shown at the link I've shared
bsdbandit-01 has joined #ruby
Swyper has joined #ruby
TomyWork has quit [Quit: Leaving]
crankharder has quit [Ping timeout: 256 seconds]
crankharder has joined #ruby
Swyper has quit [Ping timeout: 260 seconds]
howdoi has joined #ruby
bsdbandit-01 has quit [Read error: Connection reset by peer]
<nakilon>
19:16:51 <AndreYuhai> How can I start parsing regexp from the end?
jenrzzz has joined #ruby
<nakilon>
str = str.split(" ").reverse.join(" ")
<nakilon>
..D
bsdbandit-01 has joined #ruby
<nakilon>
then parse if it makes it easier
bsdbandit-01 has quit [Read error: Connection reset by peer]
DaRock has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Ping timeout: 244 seconds]
bsdbandit-01 has joined #ruby
crankharder has quit [Ping timeout: 246 seconds]
bsdbandit-01 has quit [Read error: Connection reset by peer]
TCZ has quit [Quit: Czesc]
TCZ has joined #ruby
crankharder has joined #ruby
factormystic7 has joined #ruby
<adam12>
AndreYuhai: You can get pre-match out of your regexp if that helps.
<adam12>
&>> "4335 WILLOW SPRINGS DR LOGANVILLE GA 30052" =~ /(?<city>SOCIAL CIRCLE|\w+)\s*(?<state>\w{2})\s*(?<zip>\d+)$/; $`
<AndreYuhai>
havenwood, yes all of them are like this. But in that split case I think a city name with two words would fail, right?
<AndreYuhai>
Like 'Social Circle'
<havenwood>
AndreYuhai: My brain seems broken today. Yeah, seems like it.
<havenwood>
AndreYuhai: Maybe that's why I was thinking pattern matching?
<havenwood>
AndreYuhai: How do you know when the street ends? You don't seem to be checking DR/WAY/AVE or whatev?
<havenwood>
DR LOGANVILLE seems like a completely reasonable name for a town in Oregon...
<AndreYuhai>
havenwood, we don't care about the street we just take the rest as address. So what I know is only zip, state and city :D
<havenwood>
AndreYuhai: And they're all formatted like this?
<AndreYuhai>
havenwood, That's what I am told :D
<havenwood>
AndreYuhai: Soooo, seems like you can either use the ending of the street name as a delimiter or check proposed city names against a list of real cities.
<havenwood>
AndreYuhai: Do you know either what all the streets end in or what the possible cities are?
<AndreYuhai>
havenwood, yes, since the city names are one word I don't even need a list I think. So I just match a word for the city and that's it.
<AndreYuhai>
havenwood, No, I don't know about the streets
<havenwood>
AndreYuhai: Oh, they're all one word except for Social Circle?
<AndreYuhai>
havenwood, possible cities are all one word, only exception is Social Circle
<AndreYuhai>
havenwood, correct
<havenwood>
hah
<AndreYuhai>
That's the state GA I think
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Read error: Connection reset by peer]
MalkbabY has quit [Remote host closed the connection]
MalkbabY has joined #ruby
TCZ has joined #ruby
dinfuehr has quit [Ping timeout: 265 seconds]
dinfuehr has joined #ruby
jenrzzz has joined #ruby
weaksauce has joined #ruby
crankharder has quit [Ping timeout: 260 seconds]
andremedeiros has quit [Read error: Connection reset by peer]
andremedeiros has joined #ruby
jonhg has quit [Remote host closed the connection]
jonhg has joined #ruby
supercoven_ has joined #ruby
jonhg has quit [Ping timeout: 264 seconds]
supercoven has quit [Ping timeout: 245 seconds]
alexherbo2 has quit [Ping timeout: 260 seconds]
miojo has joined #ruby
bsdbandit-01 has joined #ruby
crankharder has joined #ruby
gambl0re has joined #ruby
gambl0re has left #ruby ["WeeChat 3.0.1"]
alexherbo2 has joined #ruby
teclator has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 240 seconds]
lorraine has joined #ruby
akem has quit [Ping timeout: 256 seconds]
lorraine has quit [Ping timeout: 240 seconds]
TCZ has quit [Quit: Czesc]
gerero has joined #ruby
gerero has quit [Quit: Connection closed]
shtirlic has quit [Read error: Connection reset by peer]
gerero has joined #ruby
bsdbandit-01 has joined #ruby
shtirlic has joined #ruby
Swyper has joined #ruby
cd has quit [Quit: cd]
dvo has joined #ruby
bsdbandit-01 has quit [Read error: Connection reset by peer]
elcuervo has quit [Read error: Connection reset by peer]
elcuervo has joined #ruby
ua__ has joined #ruby
NL3limin4t0r is now known as NL3limin4t0r_afk
bsdbandit-01 has joined #ruby
s3nd1v0g1us has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jess has quit [Quit: update innit]
ua_ has quit [Ping timeout: 265 seconds]
hiroaki has quit [Ping timeout: 265 seconds]
j has joined #ruby
ua__ has quit [Remote host closed the connection]
ua has joined #ruby
jinie has joined #ruby
jenrzzz has joined #ruby
j is now known as jess
jonhg has joined #ruby
andremedeiros has quit [Read error: Connection reset by peer]
bsdbandit-01 has quit [Read error: Connection reset by peer]
andremedeiros has joined #ruby
jonhg has quit [Ping timeout: 240 seconds]
hiroaki has joined #ruby
gix has joined #ruby
teardown has joined #ruby
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Read error: Connection reset by peer]
crankharder has quit [Ping timeout: 240 seconds]
bsdbandit-01 has joined #ruby
gerero has quit [Quit: Connection closed]
bsdbandit-01 has quit [Read error: Connection reset by peer]
Iarfen has quit [Ping timeout: 256 seconds]
bsdbandit-01 has joined #ruby
alexherbo21 has joined #ruby
alexherbo2 has quit [Ping timeout: 256 seconds]
alexherbo21 is now known as alexherbo2
gerero has joined #ruby
Iarfen has joined #ruby
Guest68981 has quit [Quit: leaving]
rprimus has joined #ruby
bsdbandit-01 has quit [Read error: Connection reset by peer]
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Read error: Connection reset by peer]
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Read error: Connection reset by peer]
bsdbandit-01 has joined #ruby
al2o3-cr has quit [Ping timeout: 256 seconds]
bsdbandit-01 has quit [Read error: Connection reset by peer]
Rudd0 has quit [Ping timeout: 265 seconds]
crankharder has joined #ruby
bsdbandit-01 has joined #ruby
hiroaki has quit [Ping timeout: 265 seconds]
crankharder has quit [Ping timeout: 260 seconds]
bsdbandit-01 has quit [Read error: Connection reset by peer]
s3nd1v0g1us has joined #ruby
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Read error: Connection reset by peer]
gearnode has quit [Ping timeout: 244 seconds]
alexherbo2 has quit [Remote host closed the connection]
hiroaki has joined #ruby
ur5us has joined #ruby
Iarfen has quit [Ping timeout: 240 seconds]
bsdbandit-01 has joined #ruby
Iarfen has joined #ruby
Swyper has quit [Remote host closed the connection]
bsdbandit-01 has quit [Read error: Connection reset by peer]
crankharder has joined #ruby
jonhg has joined #ruby
jonhg has quit [Ping timeout: 245 seconds]
al2o3-cr has joined #ruby
shtirlic has quit [Ping timeout: 246 seconds]
gerero has quit [Quit: Connection closed]
gix has quit [Disconnected by services]
gix- has joined #ruby
crankharder has quit [Ping timeout: 260 seconds]
alexherbo2 has joined #ruby
crankharder has joined #ruby
alexherbo2 has quit [Remote host closed the connection]
Andre has joined #ruby
Andre is now known as Guest23713
crankharder has quit [Ping timeout: 260 seconds]
AndreYuhai has quit [Ping timeout: 264 seconds]
kinduff has quit [Ping timeout: 264 seconds]
kinduff has joined #ruby
alexherbo2 has joined #ruby
alexherbo2 has quit [Client Quit]
veleno has joined #ruby
<veleno>
Hi. I’m getting strange error trying to locally debug a github webpage. I use “bundle exec jekill serve” and I get this nasty error: https://gist.github.com/vschiavoni/c21e42bd68e1c144133ea261eb13d7cc ruby -v shows “truffleruby 20.3.0, like ruby 2.6.6, GraalVM CE Native [x86_64-darwin]” i’m on macOS 11.2.1 is this a known bug ?
bsdbandit-01 has joined #ruby
gearnode has joined #ruby
bsdbandit-01 has quit [Read error: Connection reset by peer]
_aeris has joined #ruby
_aeris_ has quit [Ping timeout: 268 seconds]
_aeris is now known as _aeris_
cd has joined #ruby
akem_ has joined #ruby
akem has quit [Ping timeout: 264 seconds]
TCZ has joined #ruby
bsdbandit-01 has joined #ruby
Rudd0 has joined #ruby
Rudd0 has quit [K-Lined]
supercoven_ has quit [Ping timeout: 240 seconds]
MalkbabY has quit [Remote host closed the connection]
MalkbabY has joined #ruby
Iarfen has quit [Ping timeout: 240 seconds]
Rudd0 has joined #ruby
vondruch has quit [Read error: Connection reset by peer]
skryking has quit [Quit: Konversation terminated!]