Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 151624 Details for
Bug 235137
java.util.regex.Matcher.replaceAll () Failure
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Exemplar code
CaretReplaceAll.java (text/plain), 828 bytes, created by
Martin Fong
on 2007-04-03 22:07:32 UTC
(
hide
)
Description:
Exemplar code
Filename:
MIME Type:
Creator:
Martin Fong
Created:
2007-04-03 22:07:32 UTC
Size:
828 bytes
patch
obsolete
>import java.util.regex.Pattern; > >public class CaretReplaceAll { > > private final static String _Blanks = " "; > private final static Pattern _CaretPttn = Pattern.compile ("^", Pattern.MULTILINE); > > public static String InsertPrefix (String aString, String prefix) { > return _CaretPttn.matcher (aString).replaceAll (prefix); > } > > public static String IndentSpaces (String aString) { > return InsertPrefix (aString, _Blanks); > } > > public static void main (String[] args) { > String testStr = "<unobserved>"; > String replStr = IndentSpaces (testStr); > int status = replStr.length () - testStr.length () - _Blanks.length (); > > if (status != 0) > System.err.println ("Error: IndentSpaces (" + testStr + ") returned \"" + replStr + "\""); > > System.exit (status); > } > >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 235137
: 151624