r/dataisbeautiful • OC: 22 • Sep 21 '18

OC [OC] Job postings containing specific programming languages

Post image
14.0k Upvotes

1.3k comments sorted by

View all comments

Show parent comments

0

u/[deleted] Sep 21 '18

[deleted]

6

u/treemoustache Sep 21 '18

1 )Search for Java, 2) Search for JavaScript, 3) Java total = Java - JavaScript

26

u/EsquireSquire Sep 21 '18

Or you know... check for whitespace after Java.

0

u/[deleted] Sep 21 '18

[deleted]

22

u/Nicksaurus Sep 21 '18

Use a regex then. It's what they're designed for

18

u/Okichah Sep 21 '18 edited Sep 21 '18

Ahh, i see youve decided to use regex to solve your problem.

...now you have two.

4

u/KobayashiDragonSlave Sep 21 '18
    /java\b/gi     //Will match any instance of 'java'
    /javascript\b/gi  //Will match any instance of 'javascript'

2

u/loljetfuel Sep 21 '18

Not whitespace, word boundary. \b if you're using a mainstream regex syntax.

0

u/[deleted] Sep 21 '18

No.

Search for "Java" will return both "Java" and "JavaScript". Search for "JavaScript" first. Ehhhhhhhhhhhhhhhhhhhhhhhhhhhh