var obj = {'<b>': null, '<i>': null};
var str = '<i>';
var tag = str.search(/<(?:b|i)>/);
or
var tag = (str in obj);
Thanks!
-- You received this message because you are subscribed to the Google Groups "JavaScript Forum" group.
To view this discussion on the web visit https://groups.google.com/d/msg/javascript-information/-/WjokDE0iZDIJ.
To post to this group, send email to javascript-information@googlegroups.com.
To unsubscribe from this group, send email to javascript-information+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/javascript-information?hl=en.
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.