Regular Expressions - Veb Programiranje

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/36

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 3:48 PM on 6/10/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

37 Terms

1
New cards
Regular expression is
Pattern defining rules for finding character combinations in strings
2
New cards
PHP regex types (2)
POSIX and PCRE (Perl Compatible Regular Expression)
3
New cards
PCRE is most popular and same as
JavaScript regex
4
New cards
Alternation in regex
"| (vertical bar) separates alternatives
5
New cards
Grouping in regex
() parentheses define scope and operator precedence
6
New cards
? quantifier means
Zero or one occurrence
7
New cards
* quantifier means
Zero or more occurrences
8
New cards
+ quantifier means
One or more occurrences
9
New cards
{n} quantifier means
Exactly n occurrences
10
New cards
"{n
m} quantifier means"
11
New cards
"{n
} quantifier means"
12
New cards
^abc in regex means
String abc at START of searched string (anchor)
13
New cards
abc$ in regex means
String abc at END of searched string (anchor)
14
New cards
[abc] character class
One occurrence of a OR b OR c
15
New cards
[^abc] negated class
"Character that is NOT a
16
New cards
\d matches
Digit (0-9)
17
New cards
\w matches
"Word character (letter
18
New cards
\s matches
Whitespace character
19
New cards
\. in regex
Escaped literal dot character
20
New cards
Regex attribute 'i' means
Case-insensitive matching
21
New cards
Regex attribute 'g' means
Global matching (finds all occurrences)
22
New cards
Regex attribute 'm' means
Multi-line matching
23
New cards
preg_match() returns
"1 if pattern found
24
New cards
preg_replace() does
Replaces pattern matches with specified string
25
New cards
preg_split() does
Splits string into array using regex pattern
26
New cards
preg_grep() does
Returns array elements containing pattern
27
New cards
String function strlen()
Returns string length
28
New cards
String function strpos()
Finds first position of substring in string
29
New cards
String function strrpos()
Finds last position of substring in string
30
New cards
String function strtolower()
Converts to lowercase
31
New cards
String function strtoupper()
Converts to uppercase
32
New cards
String function ucfirst()
Capitalizes first character
33
New cards
String function trim()
Removes characters from both ends
34
New cards
String function explode()
Splits string into array by separator
35
New cards
String function implode()
Joins array elements into string with separator
36
New cards
String function str_pad()
Pads string to certain length
37
New cards
String function substr()
Returns part of string