Hi,I am new to .net.
As per ur guidance I tried myString = myString.SubString(0,myString.Length-1);
I also used str.lastindexof n str.remove,but by using this I m gettin string as ' (B193 '' H13 '' H14 ' ) instead of (' B193 ',' H13 ',' H14' ).My original string is
(' B193 ',' H13 ',' H14 ', )I want to remove last comma.My code is ---
Dim s1, strpid As String
Dim arr(), arr2()
Dim i As Integer
s1 = Request("PatientIDs")
arr = Split(s1, ":")
For i = 0 To UBound(arr)
arr2 = Split(arr(i), ">")
strpid = ("'" & arr2(0) & "'" & ",")
Response.Write(strpid)
Next
Plz reply.
13 1878 - myString = myString.SubString(0,myString.Length-1);
This should work. What is the output you are getting?
- myString = myString.SubString(0,myString.Length-1);
This should work. What is the output you are getting?
I am getting --(' B193 '' H13 '' H14 ' ).this is removing all commas.I want
(' B193 ',' H13 ',' H14 ' )
can you post exact code part?(Check where you are using.)
can you post exact code part?(Check where you are using.)
I am sending whole code
Dim s1, strpid As String
Dim arr(), arr2()
Dim i, j As Integer
s1 = Request("PatientIDs")
arr = Split(s1, ":")
For i = 0 To UBound(arr)
arr2 = Split(arr(i), ">")
strpid = Trim("'" & arr2(0) & "'" & ",")
j = strpid.LastIndexOf(",")
strpid = strpid.Remove(j, 1)
Response.Write(strpid)
Next
'Query = "select patient_id,patient_name,study_instance_UID from studies where patient_id in " + Trim(strpid) + " "
'show_selected(Query)
I am writing on page load.
But there is no - myString = myString.SubString(0,myString.Length-1);
I mean, No
keyword
But there is no - myString = myString.SubString(0,myString.Length-1);
I mean, No
keyword
yes,I m getting str.substring
But it is removing all commas,while I want to remove onle last one.
But there is no - myString = myString.SubString(0,myString.Length-1);
I mean, No
keyword
I m sorry,First time I did'nt got ur questn.So replying second time.
Dim s1, strpid As String
Dim arr(), arr2()
Dim i, j As Integer
s1 = Request("PatientIDs")
arr = Split(s1, ":")
For i = 0 To UBound(arr)
arr2 = Split(arr(i), ">")
strpid = Trim("'" & arr2(0) & "'" & ",")
strpid = strpid.Substring(0, strpid.Length - 1)
strpid = strpid.Trim(arr2(0))
Response.Write(strpid)
Next
Actually I am trying number of methods.Writing-deleting code again n again.
- str = str.SubString(0,str.Length-1);
-
MessageBox.Show(str);
run this code and see the popup message.
Note: Write this code outside for loop.
- str = str.SubString(0,str.Length-1);
-
MessageBox.Show(str);
run this code and see the popup message.
Note: Write this code outside for loop.
I am getting selected id one by one.I mean If I select three row it is giving id like
('B193') on clinking ok it gives second id,then third.that is in quotation mark.
This seems you never got the concept.
Where you receiving the value “' B193 ',' H13 ',' H14 ',”?
Note: You have to try (Giving the solution to a homework will be a spam here) I pointed that is exactly correct but the thing is where you are applying!) try Survana you can do?... Come..on).
Hi,I am new to .net.
As per ur guidance I tried myString = myString.SubString(0,myString.Length-1);
I also used str.lastindexof n str.remove,but by using this I m gettin string as ' (B193 '' H13 '' H14 ' ) instead of (' B193 ',' H13 ',' H14' ).My original string is
(' B193 ',' H13 ',' H14 ', )I want to remove last comma.My code is ---
Dim s1, strpid As String
Dim arr(), arr2()
Dim i As Integer
s1 = Request("PatientIDs")
arr = Split(s1, ":")
For i = 0 To UBound(arr)
arr2 = Split(arr(i), ">")
strpid = ("'" & arr2(0) & "'" & ",")
Response.Write(strpid)
Next
Plz reply.
i was reading your long conversation.....CyberSoft has correctly given you the solution........but if it sounds a bit confusing I am giving you a second method ...you may try it.......hope it will work
[size=2][/size] - Dim str As String = "' B193 ',' H13 ',' H14 ',"
-
str = str.TrimEnd(",")
-
MsgBox(str)
-
This seems you never got the concept.
Where you receiving the value “' B193 ',' H13 ',' H14 ',”?
Note: You have to try (Giving the solution to a homework will be a spam here) I pointed that is exactly correct but the thing is where you are applying!) try Survana you can do?... Come..on).
Thanks for ur reply.Finally I got it!
i was reading your long conversation.....CyberSoft has correctly given you the solution........but if it sounds a bit confusing I am giving you a second method ...you may try it.......hope it will work
[size=2][/size] - Dim str As String = "' B193 ',' H13 ',' H14 ',"
-
str = str.TrimEnd(",")
-
MsgBox(str)
-
Thaks for ur reply,I got it.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: ted |
last post by:
I'm having trouble using the re module to remove empty lines in a file.
Here's what I thought would work, but it doesn't:
import re
f = open("old_site/index.html")
for line in f:
line =...
|
by: Stitch Jones |
last post by:
I'm trying to get part of my perl script using a regex to get rid of
an entire field between two ,'s I'm doing this to get a .csv formated
alot nicer. here is an example of my issue
user...
|
by: Sam Collett |
last post by:
How do I remove an item with a specified value from an array?
i.e. array values 1,2,2,5,7,12,15,21
remove 2 from array would return
1,5,7,12,15,21
(12 and 21 are NOT removed, duplicates are...
|
by: blackdevil1979 |
last post by:
Hi,
I use a combobox to get a list of fruits (_SelectedIndexChanged)... I
manage to get
Apple, Orange, Grape,
The question: How to get rid of the last comma (Grape
,
<--)
|
by: Rimuen |
last post by:
Have a string contains numbers from database. But there is similar numbers
want to remove
Example:
1,3,6,6,6,12,13,14,15,15,15,15
Want to remove the similar numbers so it would be like:...
|
by: SuvarnaChaudhari |
last post by:
Thanks lot!Its working,but I have again one doubt.I have created string but it looks like ('3435','4546','546',).So plz tell me how to remove that last one comma,so that I can pass it thru sql query...
|
by: Dennis |
last post by:
Here is what I am trying to do...
I have an XML doc that looks like:
<root>
<node>value1</node>
<node>value2</node>
<node>value3</node>
<node>value4</node>
</root>
|
by: maheswaran |
last post by:
Hi
I have this (for sampple)
abc,cde,efg,ghc,
How can i remove this last ,
I knew there is a option using reqular expreesion but could not find the answer....
|
by: anfetienne |
last post by:
hi im back again.......i have a code to create strings and save it within a text file to pass variables to flash. im using the string format below.
...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |