nav katoch

Ranch Hand
+ Follow
since May 02, 2008
nav likes ...
Eclipse IDE Java Oracle
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by nav katoch

Hi Rob,

Thanks for your time. I fixed it by doing like this message.replaceAll("[<(.|)+?>](
)", " ").

Naveen
5 years ago
Hi Steve,

Thanks for your time. My string is like this
String message = "<strong>" + title + "</strong>" +
"\n" +
"" + message.replaceAll("[<(.|)+?>]", " ") + "";
or message = title + "\n" + message.replaceAll("[<(.|)+?>]", " ");
_messages.add(message);

It is returnning the message with br as it has a substring like
. The returned message after replaceAll is Declined from Product Dispensing by Naveen Katoch br Edit Data Entry br. So I don't want the br in the returned message. Or is it possible to put br and replace with empty string. I am doing the same thing eg final String br = "br"; message = message.replaceAll(br, ""); but I wanted to create a pattern/regex inside replaceAll to replace
with an empty string.

Thanks again for your time,

Naveen Katoch
5 years ago
Hello all,

I have an html string which contains br with beginning and ending <> brackets which I want to replace with the "" empty string. I am using the String.replaceAll() method eg message.replaceAll("[<(.|)+?>]", " "). I am able to delete the < and > but not the substring "br". Please help me to modify the regex/pattern.

I appreciate your time.

Thank you so much,
Naveen Katoch
5 years ago
Hi all,

I upgraded from eclipse indigo to eclipse juno and it disconnects the weblogic server while using step into and step over functions for remote debugging. Resume (F8) is working as it is moving from breakpoint to breakpoint. Please guide me to resolve the issue as I need it all the time.

Thank you so much,

Naveen Katoch
Hi all,

I had been using these eclipse indigo, oracle 11, and weblogic 9.2. I upgraded from Eclipse Indigo to Juno. Now my server debugger has started giving the following stack trace and the weblogic crashes:
-
|BL:|TS:8/2/12 9:15:25 AM EDT|LL:FATAL |TM:10.6.220.27-1343912944878|CN:com.techrx.model.service.net.ValidatingConnection|MT:getInputStream|MSG:Error with establishing connection|EX:
Exception 941041217
java.net.ConnectException
at com.techrx.model.service.net.ValidatingConnection.getInputStream(ValidatingConnection.java:236)
at com.techrx.model.service.ServiceThread$Job.run(ServiceThread.java:92)
at com.techrx.util.DefaultThreadPool.run(DefaultThreadPool.java:185)
at java.lang.Thread.run(Thread.java:595)

-
|BL:|TS:8/2/12 9:15:25 AM EDT|LL:SEVERE|TM:10.6.220.27-1343912944878|CN:com.techrx.model.service.ServiceInvocationHandler|MT:handleRunError()|MSG:Exception caught by RemoteHandler|EX:
Exception 376917531
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.Socket.connect(Socket.java:524)
at sun.net.NetworkClient.doConnect(NetworkClient.java:155)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:388)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:523)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:640)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:983)
at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:1993)
at java.net.URLConnection.getContentType(URLConnection.java:479)
at com.techrx.model.service.net.ValidatingConnection.getInputStream(ValidatingConnection.java:235)
java.net.ConnectException: Connection refused: connect
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:501)
at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1250)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1244)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:932)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:367)
at com.techrx.model.service.net.ValidatingConnection.getInputStream(ValidatingConnection.java:307)
at com.techrx.model.service.ServiceThread$Job.run(ServiceThread.java:92)
at com.techrx.util.DefaultThreadPool.run(DefaultThreadPool.java:185)
at java.lang.Thread.run(Thread.java:595)

Please help me out to fix this issue.

Thanks for your time,

Naveen Katoch
Hi Henry,

I have fixed the first one with this public static String EMAIL_ADDRESS_VALIDATION_REGEX = "^[_A-Za-z0-9-[!#$%^&*()+]]+(\\.[_A-Za-z0-9-\\\\\"\\s]+)*@[A-Za-z0-9]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$"; but not able to fixe the seond and third yet. Please guide.
Thanks,
Naveen Katoch
5 years ago
Hi all,

I am starting a new thread as the same thread is old enough. I have a requirement to validate another email addresses. I am using the following pattern to validate my email address which is working for most of the email addresses:-
static String EMAIL_MATCH_REG = "^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$";.

I want a pattern for these emails 1) !#$%%^&*()+@xxx.com, 2) SSS_@xxx.com, not allowed _before @ symbol, and 3) AAA@xxx.com_.net, subdomains should not allow end with a special character and must be with 2 - 4 characters.

Please guide me.

Thank you so much,

Naveen Katoch
5 years ago
Thank you so much for all your inputs. I appreciate it.

Naveen
6 years ago
With this one
static String EMAIL_MATCH_REG = "^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-\\\\\"\\s]+)*@[A-Za-z0-9]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$";

This one is working too
much."more\ unusual"@example.com OK now.

Thanks,

Naveen

6 years ago
Hi team,

I am using the following pattern to validate my email address:-
static String EMAIL_MATCH_REG = "^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$";
which is working fine for
Valid email addresses:
niceandsimple@example.com OK
a.little.unusual@example.com OK
much."more\ unusual"@example.com How this one?
very.unusual."@".unusual.com@example.com How this one?
very."(),:;<>[]".VERY."very\\\ @\"very".unusual@cool.example.com How this one?

Please help me out.

Thanks,

Naveen Katoch
6 years ago
Hi Wouter,

Thank you so much for bringing these points in my notice. I highly appreciate your time and suggestion. I will modify it accordingly.

Naveen Katoch
7 years ago
Hi Campbell,

I have resolved the issue with the following code and set my operator to Not Populated in my rule:-



Thanks for your time. I appreciate you all.

Naveen Katoch

7 years ago
Thank you so much Wouter and Campbell for your inputs. I will workaround. If I could not resolve this issue, then I will ask this in SCJP forum.

Thanks again,

Naveen Katoch
7 years ago
Hi all,

I don't know if this is the right forum to post my question. If it is not, then move to the right place. I have three conditions. I have three fields of type BigDecimal.
1. If I enter $100.00 in one field, then it should show $100.00 in the second field and $75 in the third field which is working fine.
2. If I enter $0.00 in one field, then it should show $0.00 amounts in other fields which is working fine too.
3. If I enter nothing or blank, then it should show blank for all the fields based on my condition but this is not working for second and the third fields and it reads the value from the first field.

I have the following code, so please guide me in this regard.



Thank you so much for your time.

Naveen Katoch
7 years ago
Congrats!!

Naveen Katoch
7 years ago