|
|
Browse by Tags
All Tags » java
-
In a Java environment, I want to build one or more patterns that enable me to get two 'views' from the same piece of matched text. For example, if I have a numeric pattern like '1234', I want to build 'view-2' and 'view-4' versions of the match. 'view-2' would return '12' and ...
-
In a Java environment, how do I convert a pattern like 'ABC: 1230-00' to '1230'? The following pattern I believe will work to get '1230-00', but I can't figure out how to remove the '-00' part. Thanks.
Remove 'ABC:' part: (?<=ABC:?\s{0,2})\\d{2}00-00
-
Hello,
I try to check hexadecimal character codes according to this specification : "Only allow characters which hexadecimal code is between 20 and 7E".
I tried this : myString.matches("[\\x20-\\7E]"); but it doesn't work.
Any idea ?
-
Hi All,
I am trying to find out a regex pattern for a particular URL type, to extract a particular piece of information from that URL.
I am working on JAVA and the URL sample goes like this
lid={ifpdf:92000000000012345}{ifnonpdf:33000000000012345}&cadid=12345}
I am trying to search for the italicized part of the ...
-
I want to manipulate an HTML document using regular expressions.
I want to add disable='true' in all input fields not having id='controlId1' in an HTML document. I am using Java 1.5. I have written following incomplete code.
String htmlDoc = "<INPUT type=\"button\" id='controlId1' ...
-
I am using Java's regular expression library.
I need to extract the common name from an active directory's distinguished name for a user. I have the String representation of a user's distinguished name. The only portion I need or care about is the common name. I am trying to write a regular expression that will extract that ...
-
Hello All,
I am just learning regex, I need to give a alert when user enters % or * signs anywhere in the name field of my Struts(java) app. I have ^[^%*]+$ this working but just wanted to make sure I have it correct. Thanks in advance for help.
Regards,
Srini
^[^%*]+$ this working but just wanted to make sure I ...
-
Greetings -
I've been tasked with coming up with an expression that would do password validation for our application. After doing a search for ideas I came across this site and this is the solution I was able to come up with:
Language: Java
Problem: A valid password is a minimum of eight characters and a maximum of sixteen. It contatins at ...
-
To keep truly platform independent when using Java you should always consider using
System.getProperty("line.separator");
instead of \r, \n or the combination of both.
String NewText = matcher.replaceAll("-- $0 *by migration" + System.getProperty("line.separator") + "Second_String");
|
|
|