tan31989 commented on issue #8583: Regex parser should have the option to 
'skip' some number of header rows like the CSV parser can
URL: 
https://github.com/apache/incubator-druid/issues/8583#issuecomment-560933539
 
 
   @vogievetsky I have tried X number of ways, trying to copy the CSVParser 
kind of implementations. Pardon me if this is vague, but I see the following 
code is using: `if (!matcher.matches()) {}` in 
[here](https://github.com/apache/incubator-druid/blob/master/core/src/main/java/org/apache/druid/java/util/common/parsers/RegexParser.java#L93)
 is used for matching entire text.
   
   I feel that beats the purpose of Regex parser, where if the pattern does not 
match until the entire text is matched as a whole. I was of the opinion it 
would best fit the use cases, where we use: `while (matcher.find()) {}`, thus 
providing us with the ability to write regex with more flexibilities.
   
   With `matcher.find()` it's easier to replicate a regex pattern find and 
group. Adding a regex to match an entire string as is always ends up with using 
a global filter like `(.*)`. There are so many variants of regex that would be 
missed because of this.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to