On possible java way would be:
String myString = "20120712-0032";
myString = myString.replaceFirst("-.*", "");
//myString now equals 20120712
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/AIcX1n41pVMJ.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en-US.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en-US.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en-US.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en-US.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en-US.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en-US.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en-US.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/yunU0AUg4qYJ.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en-US.
It looks like you are trying to use Java code in Selenium IDE, this will not work.
Are you looking for a Selenium IDE solution rather than a Java solution?
From: seleniu...@googlegroups.com [mailto:seleniu...@googlegroups.com] On Behalf Of cevon carver
Sent: 03 July 2012 15:55
To: seleniu...@googlegroups.com
Subject: Re: [selenium-users] Trying to trim a string using java
I tried using the code, still didn't work. I know the syntax of your code is right but i'm still not familiar about selenium syntax. I tried two ways and still didn't work. The echo is still working properly though
<tr>
<td>storeText</td>
<td>id=gwt-debug-ticket_list[1][ID]</td>
<td>CsDate.replaceFirst(("-.*", ""));</td>
<td>string d =${CsDate}; ${CsDate} = d.replaceFirst("-.*", "");</td>
</tr>
<tr>
<td>echo</td>
<td>${CsDate}</td>
<td></td>
</tr>
On Monday, July 2, 2012 9:03:53 AM UTC-4, Mark Collin wrote:
On possible java way would be:
String myString = "20120712-0032";
myString = myString.replaceFirst("-.*", "");
//myString now equals 20120712
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en-US.
On Monday, July 2, 2012 9:03:53 AM UTC-4, Mark Collin wrote:
On possible java way would be:
String myString = "20120712-0032";
myString = myString.replaceFirst("-.*", "");
//myString now equals 20120712
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en-US.
On Monday, July 2, 2012 9:03:53 AM UTC-4, Mark Collin wrote:
On possible java way would be:
String myString = "20120712-0032";
myString = myString.replaceFirst("-.*", "");
//myString now equals 20120712
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en-US.
On Monday, July 2, 2012 9:03:53 AM UTC-4, Mark Collin wrote:
On possible java way would be:
String myString = "20120712-0032";
myString = myString.replaceFirst("-.*", "");
//myString now equals 20120712
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en-US.
On Monday, July 2, 2012 9:03:53 AM UTC-4, Mark Collin wrote:
On possible java way would be:
String myString = "20120712-0032";
myString = myString.replaceFirst("-.*", "");
//myString now equals 20120712
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en-US.
On Monday, July 2, 2012 9:03:53 AM UTC-4, Mark Collin wrote:
On possible java way would be:
String myString = "20120712-0032";
myString = myString.replaceFirst("-.*", "");
//myString now equals 20120712
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en-US.
On Monday, July 2, 2012 9:03:53 AM UTC-4, Mark Collin wrote:
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en-US.
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/yunU0AUg4qYJ.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en-US.
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/yunU0AUg4qYJ.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
String s = "14.015_AUDI";
String[] parts = s.split("_"); //returns an array with the 2 parts
String firstPart = parts[0]; //14.015
See https://stackoverflow.com/questions/12130776/slice-string-in-java?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/714a6e4c-bc30-4713-a352-9ff135f6f144%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.