Jay Larson February 2016

Is it possible to get a regex that select the table flip characters?

I'm looking to select the Table flip characters using regex

(╯°□°)╯︵ ┻━┻

^ this guy

so far the regex I have come up with was

(?i)\b(╯°□°)╯︵ ┻━┻\b

But it doesn't work. Any guidance would be appreciated.

-J

Answers


twernt February 2016

This is really just Wiktor Stribiżew's comment, in answer form, with example code:

var flipper = '(╯°□°)╯︵ ┻━┻';
var pattern = /\(╯°□°\)╯︵ ┻━┻/;

window.alert(pattern.test(flipper));

The word boundaries (\b) caused your regex to fail because the flipper includes characters that are not word (A-Za-z0-9_) characters.

Post Status

Asked in February 2016
Viewed 1,541 times
Voted 7
Answered 1 times

Search




Leave an answer