这个命令有什么作用?
grep "<[^>]*>" inuux.xml
正在寻找什么?
答案1
可以这样解释:
< # A literal "<" character
[^>/]* # Anything that isn't a ">" or a "/", zero or more times
> # Followed by a literal ">" character
据推测,这是为了匹配 XML/HTML 标签。它当然不是世界上最好的正则表达式,但它快速、肮脏,而且可能有效。