Java is to JavaScript as Car is to Carpet Title stolen inspired by Greg Hewgill's answer to What's the difference between JavaScript and Java?

Introduction

Java and JavaScript are commonly used languages among programmers, and are currently the most popular tags on Stack Overflow. Yet as we all know, aside from similar names, the two have almost nothing in common.

In honor of one of programming's most infamous debates, and inspired by my recent frustrations in tag searching, I propose the following:

Challenge

Write a program which takes in a string as input. Return car if the string begins with "Java" and does not include "JavaScript". Otherwise, return carpet.

Example Input and Output

car:

java
javafx
javabeans
java-stream
java-script
java-8
java.util.scanner
java-avascript
JAVA-SCRIPTING
javacarpet


carpet:

javascript
javascript-events
facebook-javascript-sdk
javajavascript
jquery
python
rx-java
java-api-for-javascript
not-java
JAVASCRIPTING


Notes


Input matching should be case insensitive
Only possibilities for output should be car or carpet
Imaginary bonus points if your answer uses Java, JavaScript, or Regex
Alternate Title: Java is to JavaScript as ham is to hamster
Java/JavaScript Polyglot, 108 107 106 bytes

//\u000As-&gt;s.matches("(?i)(?!.*javascript)java.*"/*
a=&gt;/(?!.*javascript)^java/i.test(a/**/)?"car":"carpet"


Run as Java



//\u000As-&gt;s.matches("(?i)(?!.*javascript)java.*"/*
a=&gt;/(?!.*javascript)^java/i.test(a/**/)?"car":"carpet"


Try it online!

Note: don't trust the highlight as it's incorrect. The real Java, properly interpreted looks like below because \u000A is interpreted in the very first step of the compilation as \n, de facto ending the comment that started with the line comment (//).

//
s-&gt;s.matches("(?i)(?!.*javascript)java.*"/*
a=&gt;/(?!.*javascript)^java/i.test(a/**/)?"car":"carpet"


Run as JavaScript



//\u000As-&gt;s.matches("(?i)(?!.*javascript)java.*"/*
a=&gt;/(?!.*javascript)^java/i.test(a/**/)?"car":"carpet"


Credits to @CowsQuak for the JS version.



let f=

//\u000As-&gt;s.matches("(?i)(?!.*javascript)java.*"/*
a=&gt;/(?!.*javascript)^java/i.test(a/**/)?"car":"carpet"

var a=["java","javafx","javabeans","java-stream","java-script","java-8","java.util.scanner","javascript","java-avascript","javascript-events","facebook-javascript-sdk","javajavascript","jquery","python","rx-java","java-api-for-javascript","not-java"];

for(var s of a) console.log(s.padStart(a.reduce((x,y)=&gt;x.length&gt;y.length?x:y).length) + "=&gt;" + f(s));




How many imaginary bonus points for this answer?

-1 byte thanks to @Nevay in the Java answer.