Jack Wootton

Greenhorn
+ Follow
since Dec 29, 2004
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 Jack Wootton

Thank you. If it's 0 then addnig 1 will do for me.

Many thanks

Jack
12 years ago
I don't need to compare the date.....just make it look pretty. I asked since I'm developing in Sony E. T610 so thought the Calender class may have stripped down or changed.

Are you saying that i should compare the date returned with Calendar.JANUARY, and if it matches, then explicitly store '1'?
12 years ago
MONTH seems to return 0 inn January.

Is December also 11. So adding 1 would be a solution?

Many thanks

Jack
12 years ago
It worked. Thank you.
13 years ago
Still, illegal escape character
13 years ago
I want to write a function to process my own UBB code, so (ignore spaces)

[ I M G ] myImage.gif [ / I M G ]

Would change to the html for an image. However the regular expression for replacing square brackets seems not to have been thought about. Below is some quick code that outlines what i want to do and the problem. Shove it in a JSP page:

<%! String foo = "[img]"; %>
<%! String result = ""; %>
<%= foo %>
<%
result = foo.replaceAll("[img]","-");
%>
<%= result%>


And the output is

[---]

So it is not replacing the '[' and ']' . This I understand is because '[' and ']' are used in regular expressions. However one cannot escape them because an error is thrown:

illegal escape character

What to do?
[ December 29, 2004: Message edited by: Jack Wootton ]
13 years ago