阅读背景:

正则表达式 - 小写和空格的问题

来源:互联网 

My logic isn't always working because I am missing some regex parameter in order to ignore the cases and treat 2 spaces or 0 space as same as 1 space on the side of equal sign (e.g. "=" or "= " should accept the same rule as "= "). All the code is below with demonstrations. Basically, the context is that I read a spreadsheet filled by a user with data organized by Data Element (DE) and Primary Data Set (PDS). All can be filled by its value or by Sub-fields (SF). So, in short terms, I read the input string looking for DE some_identity = some_value, or PDS some_identity = some_value or DE some_identity SF = some_value and just ignore the rest. It is working perfectly except for two issues: sometimes the user just fills the spreadsheet with two blank spaces " " where it was expected to be just one " ". In other occasions, the user typed in lower case the identity label (e.g. sf).My logic isn't always working because I am miss




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: