I thought this regex was about turning words into an array, but I get null as a result
when I want to get the second word from “facebox otherword” with array[0]
This is the regex:
this.rel.match(/facebox\[?\.(\w+)\]?/)
Thanks Richard
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Your regex matches:
facebox.abc
facebox[.abc
facebox[.abc]
facebox.abc]
with
abcbeing at least one “word character” (letters, digits, and underscores).