-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhyperlink.html
More file actions
56 lines (51 loc) · 2.19 KB
/
Copy pathhyperlink.html
File metadata and controls
56 lines (51 loc) · 2.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<html>
<head>
<title> A linking tag </title>
</head>
<body link=red vlink=pink alink=yellow>
<A name=top></A>
<A href=file:///D:/Vishwa/table2.html target="_self">
Simple table</A>
<br>
<A href=#Lesson-1>Lesson-1</A>
<br>1
<br>2</br>
<br>3</br>
<br>.</br>
<br>.</br>
<br>.</br>
<br>.</br>
<br>.</br>
<br>.</br>
<br>.</br>
<br>.</br>
<br>.</br>
<br>.</br>
<br>.</br>
<A name=Lesson-1><h3>Lesson-1</h3></A>
<p align=justify>Experiment 1: Regular Expression Date: 23/07/2024
A regular expression (regex) is a sequence of characters that define a search pattern used for
matching, searching, and manipulating text. To write a regex, start by understanding the special
characters, such as ".", "*", "+", "?", and others, which play key roles in defining patterns. Next,
choose a programming language or tool that supports regex, such as Python, Perl, or grep. Write
your pattern by combining special characters with literal characters to match specific text
sequences. Finally, use the appropriate function or method in your chosen language or tool to
apply the pattern and search for matches within a string, enabling powerful text processing and
manipulation.
Here are some simple applications of regular expressions:
1. Validation of Input: Checking if a user’s input, such as an email address, phone number, or
password, matches a specified format.
2. Search and Replace: Finding specific words or patterns in a text and replacing them with
new values, such as changing dates from one format to another.
3. Text Extraction: Extracting specific parts of a string, like URLs, hashtags, or dates, from a
larger body of text.
4. Splitting Strings: Dividing a string into substrings based on a specific delimiter, like commas,
spaces, or other patterns.
5. Finding and Counting Patterns: Searching for occurrences of a pattern within a string and
counting how many times it appears.
6. Data Cleaning: Removing unwanted characters, extra spaces, or formatting text to meet
specific requirements, like removing HTML tags from web data.
7. Log File Analysis: Filtering and analyzing log files to extract relevant information, such a
</p>
</body>
</html>