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:

  1. 014727

  2. 019727

  3. 013727

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.

  1. cmd - f enter search mode
  2. type in text test-id
  3. press opt - enter match results in current file
  4. with each instance of test-id highlighted, move cursor right 3 characters 3 times
  5. press opt - shift - select entire word (number in case)
  6. press cmd - c copy selected text clipboard
  7. move caret anywhere wish paste copied numbers , press cmd - v

enter image description here

in gif above, finish

  1. cmd - a select text
  2. cmd - v paste copied numbers

Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -