Example of Shortest Match & Longest Match


in grepeze "basically" understanding concept of longest match vs shortest match can't come example (that works) demonstrate difference. also, longest / shortest relevant category of search criteria or searches.

 

thanks

marvin

say had text said "please see pp. 45, 50 , 90 more info."

 

searching pp.*[0-9]+ match "pp. 45, 50 , 90" because extends ".*" far can matching number @ end.

 

however, searching pp.*?[0-9]+ match "pp. 45" because stops @ shortest match.

 

is mean?

 

it makes huuuuge difference if trying grep replacement within html code, because if try , search next closing angle bracket , forget less greedy "?" symbol, match rest of document!



More discussions in InDesign


adobe

Comments

Popular posts from this blog

Flip address is out of range arduino uno r3

Arduino Uno not uploading

Indesign and MathType fonts