You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2012/09/26 21:21:08 UTC
[jira] [Created] (LANG-830) FastDateParser could use \Q \E to quote
regexes
Sebb created LANG-830:
-------------------------
Summary: FastDateParser could use \Q \E to quote regexes
Key: LANG-830
URL: https://issues.apache.org/jira/browse/LANG-830
Project: Commons Lang
Issue Type: Improvement
Components: lang.time.*
Reporter: Sebb
Priority: Minor
The escapeRegex method relies on knowing exactly what all the meta-characters are when excaping text. This is potentially fragile.
It would be a lot simpler to use the \Q \E quoting mechanism.
There would need to be special handling for unquote==true.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (LANG-830) FastDateParser could use \Q \E to
quote regexes
Posted by "Sebb (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LANG-830?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13464625#comment-13464625 ]
Sebb commented on LANG-830:
---------------------------
The Pattern.quote() method can be used for this.
> FastDateParser could use \Q \E to quote regexes
> -----------------------------------------------
>
> Key: LANG-830
> URL: https://issues.apache.org/jira/browse/LANG-830
> Project: Commons Lang
> Issue Type: Improvement
> Components: lang.time.*
> Reporter: Sebb
> Priority: Minor
>
> The escapeRegex method relies on knowing exactly what all the meta-characters are when excaping text. This is potentially fragile.
> It would be a lot simpler to use the \Q \E quoting mechanism.
> There would need to be special handling for unquote==true.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (LANG-830) FastDateParser could use \Q \E to
quote regexes
Posted by "Sebb (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LANG-830?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sebb resolved LANG-830.
-----------------------
Resolution: Fixed
Fix Version/s: 3.2
URL: http://svn.apache.org/viewvc?rev=1390954&view=rev
Log:
LANG-830 FastDateParser could use \Q \E to quote regexes
Modified:
commons/proper/lang/trunk/src/changes/changes.xml
commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/FastDateParser.java
> FastDateParser could use \Q \E to quote regexes
> -----------------------------------------------
>
> Key: LANG-830
> URL: https://issues.apache.org/jira/browse/LANG-830
> Project: Commons Lang
> Issue Type: Improvement
> Components: lang.time.*
> Reporter: Sebb
> Priority: Minor
> Fix For: 3.2
>
>
> The escapeRegex method relies on knowing exactly what all the meta-characters are when excaping text. This is potentially fragile.
> It would be a lot simpler to use the \Q \E quoting mechanism.
> There would need to be special handling for unquote==true.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira