[jboss-jira] [JBoss JIRA] (ELY-220) Add a RegExSplittingNameRewriter
David Lloyd (JIRA)
issues at jboss.org
Sat Jun 27 10:48:02 EDT 2015
[ https://issues.jboss.org/browse/ELY-220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13084428#comment-13084428 ]
David Lloyd commented on ELY-220:
---------------------------------
The regex form was intended to allow this:
{code}
NameRewriter extractingRewriter = new RegexNameRewriter(Pattern.compile("([a-z0-9])@mycompany\\.com"), "$1", true);
{code}
If you want to put a literal $ in the target, you can escape it, or do this:
{code}
NameRewriter transformingRewriter = new RegexNameRewriter(Pattern.compile("@"), Matcher.quoteReplacement("$"), true);
{code}
> Add a RegExSplittingNameRewriter
> ---------------------------------
>
> Key: ELY-220
> URL: https://issues.jboss.org/browse/ELY-220
> Project: WildFly Elytron
> Issue Type: Feature Request
> Components: Utils
> Reporter: Darran Lofthouse
> Assignee: Darran Lofthouse
> Fix For: 1.0.0.Alpha2
>
>
> The existing implementations allow for replacing a portion of a name based on a regular expression or validating a name based on a regular expression - however we do not have a form that allows you to easily extract a portion of a name.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
More information about the jboss-jira
mailing list