regex - Regexp match all between parenthesis. -


i have following snippet of text:

@article{carr2006,   title={techniques qualitative , quantitative measurement of aspects of laser-induced damage important laser beam propagation},   author={carr, cw , feit, md , nostrand, mc , adams, jj},   journal={meas. sci. technol.},   volume={17},   number={7},   pages={1958},   year={2006},   publisher={iop publishing} }  @article{nif1998, author = {schwartz, sheldon , feit, michael d. , kozlowski, mark r. , mouser, ron p.}, title = {current 3-ω large optic test procedures , data analysis quality assurance of national ignition facility optics}, journal = {proc. spie}, volume = {3578}, number = {}, pages = {314-321}, year = {1999}, } 

and i've been trying extract article it's tag, fail understand how greedy/non-greedy works, or rather how capture in brackets when contains more brackets :/

the following regexp returns result until first brackets, not i'm aiming for...

/\{(carr2006[^}]+)\}?/s 

also trying capture full text @article in front, doesn't work either...

/@*\{(carr2006[^}]+)\}?/s 

any explanations on i'm doing wrong helpful :)

you may change regex below.

@\w+\{1st_standard(?:,\s*\w+\s*=\s*(?:{[^}]*}|"[^"]*"))+,?\s*\} 

demo

\s* should match type of whitespace character match line breaks.


Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

c# - two queries in same method -