mirror of
https://github.com/tstack/lnav
synced 2024-11-01 21:40:34 +00:00
[parser] number regex refinements
This commit is contained in:
parent
3e54f1d8cc
commit
945495b5d1
@ -93,9 +93,11 @@ static struct {
|
||||
},
|
||||
{ "pcnt", pcrepp("\\A(-?[0-9]+(\\.[0-9]+)?[ ]*%\\b)"),
|
||||
},
|
||||
{ "num", pcrepp("\\A(-?[0-9]+(\\.[0-9]+)?([eE][-+][0-9]+)?\\b)"),
|
||||
{ "num", pcrepp("\\A(-?[0-9]+(\\.[0-9]+)?([eE][-+][0-9]+)?)"
|
||||
"\\b(?![\\._\\-][a-zA-Z])"),
|
||||
},
|
||||
{ "hex", pcrepp("\\A(-?(?:0x|[0-9])[0-9a-fA-F]+\\b)"),
|
||||
{ "hex", pcrepp("\\A(-?(?:0x|[0-9])[0-9a-fA-F]+)"
|
||||
"\\b(?![\\._\\-][a-zA-Z])"),
|
||||
},
|
||||
|
||||
{ "mail", pcrepp("\\A([a-zA-Z0-9\\._%+-]+@[a-zA-Z0-9\\.-]+\\.[a-zA-Z]+)\\b"), },
|
||||
@ -103,7 +105,8 @@ static struct {
|
||||
{ "word", pcrepp(
|
||||
"\\A([a-zA-Z][a-z']+(?=[\\s\\(\\)!\\*:;'\\\"\\?,]|[\\.\\!,\\?]\\s|$))"), },
|
||||
{ "sym", pcrepp(
|
||||
"\\A([^\";\\s:=,\\(\\)\\{\\}\\[\\]\\+#!@%\\^&\\*'\\?<>\\~`\\|\\\\]+)"),
|
||||
"\\A([^\";\\s:=,\\(\\)\\{\\}\\[\\]\\+#!@%\\^&\\*'\\?<>\\~`\\|\\\\]+"
|
||||
"(?:::[^\";\\s:=,\\(\\)\\{\\}\\[\\]\\+#!@%\\^&\\*'\\?<>\\~`\\|\\\\]+)*)"),
|
||||
},
|
||||
{ "line", pcrepp("\\A(\r?\n|\r|;)"),
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user