How to get data between "_id =" and "&"?
How to process the line "7c23a12f0cffa6cf2fac0baf8eacf4c1" from the file. I am trying to get data between _id=
and&
example file:
4593733f4ab534f0001ecbe20000b3e9 / cgi-bin / rsspipes / dispatch Alternative = 10 = ECMINSTITUTE the Category & & the Type = News & _action the run = &? _Id = 7c23a12f0cffa6cf2fac0baf8eacf4c1 & _out the json = & _render the json = & = & _time dojo_preventCache = 1253389550099Z1f8wengine.pipes.yahoo.com: 8080rhttp: //ecminstitute.appspot.com/gMozilla/ 5.0 (Macintosh; U; Intel Mac OS X 10_4_11; en) AppleWebKit / 531.9 (KHTML, like Gecko) Version / 4.0.3 Safari / 531.910jdmm6t5aneif & b = 4 & d = zhJNm4hpYEL50eT2b_Zabr3mZKV2A1Am - shz.
+2
donut
source
to share
5 answers
It is slightly more robust than some of the alternatives.
[&?] _ id = ([a-f0-9] +) (?: [&] | $)
[&?] # makes sure it isn't part of another parameter
_id=
(
[a-f0-9]+ # at least one hexadecimal digit
)
(?:
[&] # make sure there isn't some trailing data
|
$ # might be at the end of the string
)
+3
source to share