Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unexpected char on pipe symbol #15

Closed
jkuhnert opened this issue Dec 4, 2014 · 3 comments
Closed

unexpected char on pipe symbol #15

jkuhnert opened this issue Dec 4, 2014 · 3 comments

Comments

@jkuhnert
Copy link

jkuhnert commented Dec 4, 2014

Was presented with an unexpected char error when trying to make your awesome tool choke on this regexp pattern which I myself am not responsible for having written but nonetheless does still validly work (as a java.util.regex pattern):

(\w*?)(\s+|^)(NORTHEAST |NORTHWEST |SOUTHEAST |SOUTHWEST |NORTH |SOUTH |EAST |WEST |NE |NW |SE |SW |N |E |S |W |)\s*?((COUNTY |CNTY |CTY |STATE |ST |US |UNITED STATES |TOWNSHIP |TS |TWP |OLD |RANCH |INTERSTATE |)\s*?((?<=(?:COUNTY |STATE |ST |RANCH |CNTY |CTY |TOWNSHIP |TS |TWP |OLD |))ROAD|(?<=(?:COUNTY |STATE |ST |RANCH |CNTY |CTY |TOWNSHIP |TS |TWP |OLD ))RD|(?<= )HIGHWAY|(?<= )HIWAY|(?<= )HWY|(?<= )EXPRESSWAY|(?<!^STAR |^TRACY|^)ROUTE|(?<!(?:^STAR |^TRACY|^))RTE|rte|(?<!(?:^STAR |^TRACY|^))RT(?= )|(?<= )CR(?= )|(?<= )VIA(?= )|(?<= )INTERSTATE(?= )|(?<= )LOOP|(?<= )I(?=-\d+)|(?<= )I(?= \d+)|(?<= )I(?=\d+)))($|[-\s]*(\w?\w*)( NORTHEAST(?=$| )| NORTHWEST(?=$| )| SOUTHEAST(?=$| )| SOUTHWEST(?=$| )| NORTH(?=$| )| SOUTH(?=$| )| EAST(?=$| )| WEST(?=$| )| NE(?=$| )| NW(?=$| )| SE(?=$| )| SW(?=$| )| N(?=$| )| E(?=$| )| S(?=$| )| W(?=$| )|)\s*(.*?))
CJex added a commit that referenced this issue Dec 5, 2014
CJex added a commit that referenced this issue Dec 5, 2014
@CJex
Copy link
Owner

CJex commented Dec 5, 2014

Thanks. I fixed the first problem. But sadly I found the regex contains (?<=a) ,which doesn't support by javascript and regulex currently. See: #16

@CJex CJex closed this as completed Dec 5, 2014
@jkuhnert
Copy link
Author

jkuhnert commented Dec 5, 2014

Sweet yeah, I think what you've got going here is pretty great so far either way.

P.S. You should check out http://conveyal.com/blog/2014/04/28/transitive-intro/ (https://github.com/conveyal/transitive.js) for some more ideas on styling and laying out of things, perhaps. What they've done so far is really really beautiful IMO.

@liudongmiao
Copy link

demo: jianyu.io/regulex/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants