javascript - highlight all chars that are not in regular experssion - angular -
i need write function in javascript - angular gets string , highlights chars not in [ a-za-z0-9_\-\(\)\+#!@$%,."<>^=\\].
how find chars not regular experssion? (pay attending string comes users convert html may not good..)
you can utilize str.split(/([ a-za-z0-9_\-\(\)\+#!@$%,."<>^=\\]+)/) should homecoming array every sec entry beingness right parts, , odd parts beingness wrong parts.
see http://blog.getify.com/to-capture-or-not/#stumble
javascript angularjs
No comments:
Post a Comment