Return-Path: X-Original-To: apmail-commons-user-archive@www.apache.org Delivered-To: apmail-commons-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E46A518481 for ; Sat, 14 Nov 2015 19:02:31 +0000 (UTC) Received: (qmail 2375 invoked by uid 500); 14 Nov 2015 19:02:31 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 2265 invoked by uid 500); 14 Nov 2015 19:02:31 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 2253 invoked by uid 99); 14 Nov 2015 19:02:30 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 14 Nov 2015 19:02:30 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 65DE9C0289 for ; Sat, 14 Nov 2015 19:02:30 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.879 X-Spam-Level: ** X-Spam-Status: No, score=2.879 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 4Wc5h3Dh9PiG for ; Sat, 14 Nov 2015 19:02:29 +0000 (UTC) Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 74F8043C83 for ; Sat, 14 Nov 2015 19:02:29 +0000 (UTC) Received: by wmdw130 with SMTP id w130so66147026wmd.0 for ; Sat, 14 Nov 2015 11:02:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=CSE/7VE5ebgRTG+FTBJg04sGbhu0u132/MpTVc32MOo=; b=TDgKPnQiUjRJyB0gWj19rEnw+Pg+bSYWppiAbGtlj82ferlFiuA36RDOpKJQ760aDn CzsrKRyjNtk/Wc2HCpcVxCUJScX2CAYweLEzNljqyWnnM46j+cbZnWwCKIm5F/nZb5eT lzyXT5gCi6gqtO4xM05fQwHxwozbGqxcKDDe/pfEzT9wKdG2QT/vkzhJZx+TxfkiE4wm 7DLDl9k9kYZe3Y+8Fpnv4o5OTUA+oNfKjjr/MOJJnHcixaW8UPK+Dx5S4HIWTHow+IXz KwJ7xVhbfoDSuiymwferbS2qV+qCEUCcFduuYwRkik36FaK/eF5BqYjUy3ZW6B+Rem8V yOTA== X-Received: by 10.28.87.21 with SMTP id l21mr10717117wmb.6.1447527748712; Sat, 14 Nov 2015 11:02:28 -0800 (PST) MIME-Version: 1.0 From: Alex Soto Date: Sat, 14 Nov 2015 19:02:19 +0000 Message-ID: Subject: Commons Lang substitution To: user@commons.apache.org Content-Type: multipart/alternative; boundary=001a11444f2243be13052484d13e --001a11444f2243be13052484d13e Content-Type: text/plain; charset=UTF-8 Hi I have two special requirements that I think that Common-Lang StrSubstitutor does not cover, but I would like to know if it is correct or not. The first requirement is that I would like to know if there is a way to make StrSubstitutor works with using simple character as prefix and no suffix. For example: "This is my $name and I am happy" I have tried by using new StrSubstitutor(map, "$", "") and StrSubstitutor(map, "$", " ") but no luck. I have tried with commons-lang and commons-lang3. The second one is that I would like to know if there is a way to force that in case of no substitution found, the var is replaced with white space instead of untouch it. Thank you very much for your attention. Alex. --001a11444f2243be13052484d13e--