sublimetext2 - Regex to get all data after certain word and between quotation marks -
this question has answer here:
i have xml file lots of data, contains list of ids looks this
<test test-id="014727"> <not-test not-test-id="11111"> <not-test not-test-id="22222"> <not-test not-test-id="3333"> <test test-id="019727"> <test test-id="013727"> so far have searched test-id gives me list of numbers, doesn't filter out additional info.
using regex in sublime text, how can list of numbers after test-id?
so example above have 3 lines of:
014727019727013727
edit
original question edited exclude <not-test not-test-id="11111"> nodes. modify step 2 below add space () before test-id in search query. rest of steps stay same.
the following keystrokes use sublime on os x. if wants provide windows equivalent, helpful.
- cmd - f enter search mode
- type in text
test-id - press opt - enter match results in current file
- with each instance of
test-idhighlighted, move cursor right 3 characters → 3 times - press opt - shift - → select entire word (number in case)
- press cmd - c copy selected text clipboard
- move caret anywhere wish paste copied numbers , press cmd - v
in gif above, finish
- cmd - a select text
- cmd - v paste copied numbers

Comments
Post a Comment