String & Regular Expression – MCQ

String:

A string is a data type used in programming, that is used to represent text rather than numbers. A string is a sequence of characters and can contain letters, numbers, symbols and even spaces. Strings are an essential data type in programming languages, as they allow programmers to work with textual data. Strings are used to represent characters, words, sentences, and even entire documents.

Regular Expression:

A RegEx, or Regular Expression, is a sequence of characters that forms a search pattern. RegEx can be used to detect the presence or absence of a text by matching it with a particular pattern and also can split a pattern into one or more sub-patterns. Regular expressions are used in string-searching algorithms for “find” or “find and replace” operations on strings, or for input validation.

Python-String & Regular Expressions QB