in Education by
Which of the following matches nonword character using regular expression in java? (a) \w (b) \W (c) \s (d) \S The question was asked during an interview. Question is from Regular Expression in portion Regular Expressions of Java Select the correct answer from above options JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
Right answer is (b) \W The explanation is: \W matches nonword characters. [0-9], [A-Z] and _ (underscore) are word characters. All other than these characters are nonword characters.

Related questions

0 votes
0 votes
0 votes
    Object of which class is used to compile regular expression? (a) Pattern class (b) Matcher class (c ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    What does /[^(]* regular expression indicate? (a) Match one or more characters that are not open ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 23, 2021 in Education by JackTerrance
0 votes
    The class that represents the regular expressions is ________ (a) RegExpObj (b) RegExpClass (c) RegExp (d) ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
0 votes
    Which of the following is advantage of using PreparedStatement in Java? (a) Slow performance (b) Encourages ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    Which of these methods will be invoked if a character is entered? (a) keyPressed() (b) keyReleased( ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    Which character in JavaScript code will be interpreted as XML markup? (a) ! (b) > (c) & (d) ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 23, 2021 in Education by JackTerrance
0 votes
    Which capturing group can represent the entire expression? (a) group * (b) group 0 (c) group * ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    What is the return type of lambda expression? (a) String (b) Object (c) void (d) Function This ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    A function definition expression can be called as __________ (a) Function prototype (b) Function literal (c) ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
...