-
Outline
- vim under regular non-greedy match
-
background
- Jvm review related content
- Find information derived, not very friendly, so I want to format
-
surroundings
- THE
- win10
- git-bash
- mintty-2.9.4
- THE
1. The original segment
-
paragraph
Non-default VM flags: -XX:-BytecodeVerificationLocal -XX:-BytecodeVerificationRemote -XX:CICompilerCount=4 -XX:InitialHeapSize=1073741824 -XX:+ManagementServer -XX:MaxHeapSize=17163091968 -XX:MaxNewSize=5721030656 -XX:MinHeapDeltaBytes=524288 -XX:NewSize=357564416 -XX:OldSize=716177408 -XX:TieredStopAtLevel=1 -XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:+UseFastUnorderedTimeStamps -XX:-UseLargePagesIndividualAllocation -XX:+UseParallelGC
2. Requirements
-
The output text format
- format requirement
Non-default VM flags:
Make the trip alone- The rest of each line, the format
-XX:-BytecodeVerificationLocal
- format requirement
-
The final product
Non-default VM flags: -XX:-BytecodeVerificationLocal ...
3. Ideas
- Use ex expression
- Use ex expression, do replace
- Replace certainly be related to the regular
4. Try
Pretreatment
- First
Non-default VM flags:
singled out- The latter format, basically the same, and very easy to deal with
1 try
-
Use the ex command
: s/\(-.* \)/\1\r/g
-
result
- Discover content matching, and I expected quite the same
- In addition to that last -XX format, all my matches on
- And I think this is not the same ah ....
- Discover content matching, and I expected quite the same
-
Think
- Vaguely recall, heard the argument before a greedy match
- Greed match
- Try to match up to a content
- In particular repetition, like nested scene, obvious
- Non-greedy match
- Try to match the contents of a few
- Greed match
- Vaguely recall, heard the argument before a greedy match
Try 2: introducing a non-greedy match
-
Use the ex command
: s/\(-.\{-} \)/\1\r/g
-
Non-greedy
- .{-}
-
This is the corresponding * non-greedy match
-
Match result
-XX:-BytecodeVerificationLocal
-
Ah, in line with expectations
-
- .{-}
-
Finally, a small modification
- In the final text, with a space
- So that you can look at all the rows processed
- In the final text, with a space
-
problem
- path
- trigger
- There are variables path
- Space path inner tube
- note
- Cutting that might cut down some incomplete path
- I can only manually check
- Too much food should still own it ...
- trigger
- path
Try 3: Another Way of Thinking
-
Use the ex command
:s/\( -[A-Za-z0-9:-]*\)/\1\r/g
-
How to say
-
Failed ideas
- This idea glance valid
- But in fact, I miss a lot
-
the difference
- Recipe for success
- Focus is in accordance with the mode split,
- Ignoring the middle of the content, to reduce a lot of workload
- Failed ideas,
- We do not pay attention to patterns, actually concentrate on looking for content
- But ignoring the essence
- Recipe for success
-
But this line of thinking, I think sometimes, it should still work ...
- If found, I will write down
-
3. Follow-up
-
Match the content of the scene
-
At the same time matching the content and mode of scene
- Can one step
2, or should I say, we need to match the pattern, and then matches
- Can one step
-
vim match, there are a lot of content, the follow-up destined to be used to talk about it
-
grep, awk, sed the same scene, how to deal with
ps
- ref
1. VIM regularization of non-greedy match
1 match thinking
2. vim syntax associated with
1. I do not know how better use
2. ZZ: VIM regularization of non-greedy match
1. genuine original
1. Because typesetting and Sina microblogging not afraid, so we have ref1