MindMap Gallery Regular expression basics
This is a mind map about the basics of regular expressions. The main content includes: regular expression tools, regular expression application examples, advanced features of regular expressions, back references, grouping and capture, quantifiers, anchors, character classes , metacharacters, constituent elements, definitions.
Edited at 2024-11-19 08:56:01魯米:靈性覺醒的10個維度。當你停止尋找自己,便會找到整個宇宙,因為你正在尋找的東西,也在尋找你。任何你每天持之以恆在做的事情,都可以為你打開一扇通向精神深處的門。靜默中,我滑入祕境,萬般皆妙樂觀察身邊的神奇,不要聲張。你生而有翼,為何喜歡爬行?靈魂擁有了它自己的耳朵,能夠聽到頭腦無法理解的事情。向內尋求一切的答案吧,宇宙中的一切都在你體內。情人們並不最終相遇某處,這個世界沒有離別。傷口是光進入你內心的地方。
慢性心力衰竭,不僅僅是心率的快慢問題!它源於心肌收縮與舒張功能的下降,導致心輸出量不足,進而引發肺循環充血和體循環淤血。從病因、誘因到代償機制,心衰的病理生理過程複雜多樣。通過控制水腫、減輕心臟前後負荷、改善心臟舒縮功能,以及防治基本病因,我們可以有效應對這一挑戰。了解心衰的機制與臨床表現,掌握防治策略,才能更好地守護心臟健康。
缺血再灌注損傷是器官或組織恢復血液供應後,細胞功能代謝障礙和結構破壞反而加重的現象。其主要機制包括自由基生成增多、鈣超載以及微血管和白細胞的作用。心臟和腦是常見的受損器官,表現為心肌代謝和超微結構變化、心功能下降等。防治措施包括清除自由基、減輕鈣超載、改善代謝和控制再灌注條件,如低鈉、低溫、低壓等。理解這些機制有助於製定有效治療方案,減輕缺血性損傷。
魯米:靈性覺醒的10個維度。當你停止尋找自己,便會找到整個宇宙,因為你正在尋找的東西,也在尋找你。任何你每天持之以恆在做的事情,都可以為你打開一扇通向精神深處的門。靜默中,我滑入祕境,萬般皆妙樂觀察身邊的神奇,不要聲張。你生而有翼,為何喜歡爬行?靈魂擁有了它自己的耳朵,能夠聽到頭腦無法理解的事情。向內尋求一切的答案吧,宇宙中的一切都在你體內。情人們並不最終相遇某處,這個世界沒有離別。傷口是光進入你內心的地方。
慢性心力衰竭,不僅僅是心率的快慢問題!它源於心肌收縮與舒張功能的下降,導致心輸出量不足,進而引發肺循環充血和體循環淤血。從病因、誘因到代償機制,心衰的病理生理過程複雜多樣。通過控制水腫、減輕心臟前後負荷、改善心臟舒縮功能,以及防治基本病因,我們可以有效應對這一挑戰。了解心衰的機制與臨床表現,掌握防治策略,才能更好地守護心臟健康。
缺血再灌注損傷是器官或組織恢復血液供應後,細胞功能代謝障礙和結構破壞反而加重的現象。其主要機制包括自由基生成增多、鈣超載以及微血管和白細胞的作用。心臟和腦是常見的受損器官,表現為心肌代謝和超微結構變化、心功能下降等。防治措施包括清除自由基、減輕鈣超載、改善代謝和控制再灌注條件,如低鈉、低溫、低壓等。理解這些機制有助於製定有效治療方案,減輕缺血性損傷。
Regular expression basics
1. definition
Pattern used to match combinations of characters in a string
2. Components
Normal characters
match self
Such as letters, numbers, Chinese characters, etc.
special characters
Characters with special meaning
Such as period (.), asterisk (*), etc.
3. Metacharacters
Special characters used to build regular expressions
period(.)
Matches any single character except newline characters
asterisk (*)
Matches the previous character 0 or more times
plus sign ( )
Matches the previous character 1 or more times
question mark(?)
Matches the previous character 0 or 1 times
square brackets()
Matches any single character within square brackets
Braces ({})
Specify the range of matches
vertical bar()
Represents logical OR
Backslash(\\)
Escape characters, cancel the special meaning of special characters
4. Character class
definition
Matches any single character within the specified range
Example
az
Match all lowercase letters
09
match all numbers
aAZ
Matches all uppercase and lowercase letters
5. anchor point
definition
Match a string at a specific position
type
Caret (^)
Start position of matching line
Dollar sign ($)
The end of the matching line
6. quantifier
definition
Number of occurrences of a specified character or character class
type
greedy quantifier
Match as many characters as possible
like*
Matches the previous character 0 or more times
like
Matches the previous character 1 or more times
non-greedy quantifier
Match as few characters as possible
like*?
Matches the previous character 0 or more times non-greedily
like ?
Matches the previous character 1 or more times non-greedily
7. Grouping and capturing
definition
Combining parts of a regular expression
effect
Extract matching substring
Apply quantifiers to the entire combination
grammar
parentheses(())
Create group
Such as (a(bc))
Matches "ab" or "ac"
8. backreference
definition
Reference to a previously defined group
grammar
Backslash plus numbers
Such as\1
Reference to the first group
9. Advanced features of regular expressions
zero-width assertion
Match positions rather than characters
Looking forward (?=)
Match the content after a certain position
Looking backward (?<=)
Match the content before a certain position
Negative lookahead(?!)
Match content that does not meet the condition after a certain position
Negative and backward looking(?<!)
Match content before a certain position that does not meet the condition
conditional expression
Match different strings based on conditions
Such as (a(bc)d)
Matches "ab", "ac" or "d"
mode modifier
Change the behavior of regular expressions
Such as i
Ignore case
Such as m
multiline mode
Such as s
Make the dot (.) match any character including newlines
Such as u
Match using Unicode character set
Such as x
Allow adding spaces and comments in regular expressions
10. Regular expression application examples
Text search
Find strings matching a pattern in text
Data validation
Verify the correctness of the input data format
text replacement
Replace strings in text that match a pattern
String splitting
Split string into array based on pattern
Applications in programming languages
Most programming languages support regular expressions for string processing
Such as Python, Java, JavaScript, etc.
11. Regular expression tool
Online regular expression tester
For testing and debugging regular expressions
Integrated development environment (IDE) support
Provides regular expression search and replace functionality
Text editor plug-in
Enhance regular expression processing capabilities of text editors
Command line tools
Such as grep, sed, etc.
For processing text data from the command line