473,406 Members | 2,713 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

How to extract multiple occurrences of a substring

Hello.

Using VS.NET 2003 VB. If i have a string similar to the attached, how would
i extract the "Truckname=" data from it in a loop and stay in the loop until
the end of the string is reached ? As you can see the first truckname is
"284165". The next truckname is "284193"

Any help would be gratefully appreciated.

Thanks,
Tony

<TruckConduitDataObject><Truck XVIN="67112637" TruckName="284165"
OrganizationID="1214" OrganizationName="Croydon Dry"
DateOfQuery="2006-04-19T21:56:08.3700000-05:00" IsActive="true"
Odo="1874679.8" OdoAsOf="2006-04-19T20:43:00.0000000-05:00"
FormattedDateTime="04/19/06 04:43p" Axles="2" Berth="false"
HasOnBoardPlatform="true" HasDIU="true" /><Truck XVIN="67112638"
TruckName="284193" OrganizationID="1214" OrganizationName="Croydon Dry"
DateOfQuery="2006-04-19T21:56:08.3700000-05:00" IsActive="true"
Odo="1633058.2" OdoAsOf="2006-04-19T20:21:00.0000000-05:00"
FormattedDateTime="04/19/06 04:21p" Axles="3" Berth="false"
HasOnBoardPlatform="true" HasDIU="true" /><Truck XVIN="67112639"
TruckName="294934" OrganizationID="1214" OrganizationName="Croydon Dry"
DateOfQuery="2006-04-19T21:56:08.3700000-05:00" IsActive="true"
Odo="128325.5" OdoAsOf="2006-04-19T14:43:00.0000000-05:00"
FormattedDateTime="04/19/06 10:43a" Axles="3" Berth="false"
HasOnBoardPlatform="true" HasDIU="true" /><Truck XVIN="67112640"
TruckName="241486" OrganizationID="1214" OrganizationName="Croydon Dry"
DateOfQuery="2006-04-19T21:56:08.3700000-05:00" IsActive="true"
Odo="249414.5" OdoAsOf="2006-04-19T04:00:00.0000000-05:00"
FormattedDateTime="04/19/06 12:00a" Axles="3" Berth="false"
HasOnBoardPlatform="true" HasDIU="true" /><Truck XVIN="67112641"
TruckName="447859" OrganizationID="1214" OrganizationName="Croydon Dry"
DateOfQuery="2006-04-19T21:56:08.3700000-05:00" IsActive="true" Odo="283377"
OdoAsOf="2006-04-19T20:44:00.0000000-05:00" FormattedDateTime="04/19/06
04:44p" Axles="3" Berth="false" HasOnBoardPlatform="true" HasDIU="true"
/><Truck XVIN="67112642" TruckName="425218" OrganizationID="1214"
OrganizationName="Croydon Dry"
DateOfQuery="2006-04-19T21:56:08.3700000-05:00" IsActive="true" Odo="86711.9"
OdoAsOf="2006-04-19T20:40:00.0000000-05:00" FormattedDateTime="04/19/06
04:40p" Axles="3" Berth="false" HasOnBoardPlatform="true" HasDIU="true"
/><Truck XVIN="67112662" TruckName="211103" OrganizationID="1214"
OrganizationName="Croydon Dry"
DateOfQuery="2006-04-19T21:56:08.3700000-05:00" IsActive="true"
Odo="185236.2" OdoAsOf="2006-04-19T04:00:00.0000000-05:00"
FormattedDateTime="04/19/06 12:00a" Axles="3" Berth="false"
HasOnBoardPlatform="true" HasDIU="true" /><Truck XVIN="67112667"
TruckName="251638" OrganizationID="1214" OrganizationName="Croydon Dry"
DateOfQuery="2006-04-19T21:56:08.3700000-05:00" IsActive="true" Odo="0"
OdoAsOf="1990-01-01T00:00:00.0000000-06:00" FormattedDateTime="12/31/89
07:00p" Axles="3" Berth="false" HasOnBoardPlatform="false" HasDIU="false"
/></TruckConduitDataObject>
Apr 19 '06 #1
13 2693

"Tony Girgenti" <To**********@discussions.microsoft.com> wrote in message
news:4B**********************************@microsof t.com...
Hello.

Using VS.NET 2003 VB. If i have a string similar to the attached, how
would
i extract the "Truckname=" data from it in a loop and stay in the loop
until
the end of the string is reached ? As you can see the first truckname is
"284165". The next truckname is "284193"


Is this all in one line?

Apr 19 '06 #2
Tony Girgenti wrote:
Hello.

Using VS.NET 2003 VB. If i have a string similar to the attached, how would
i extract the "Truckname=" data from it in a loop and stay in the loop until
the end of the string is reached ? As you can see the first truckname is
"284165". The next truckname is "284193"

Any help would be gratefully appreciated.


Tony, I have made a couple of assumptions with the following code -

1. You are reading data from a file
2. The TruckName data is always 6 chars long

I hope you'll be able to apply what's written here to your specific
requirements.

Dim sFileName As String = "C:\Temp\TruckData.txt"
Dim sA As String = File.ReadAllText(sFileName)
Dim X As Integer = 0

Do
X = sA.IndexOf("TruckName=", X)
If X <> -1 Then
X += 11
Debug.Print(sA.Substring(X, 6))
Else
Exit Do
End If
Loop

I tested it on your supplied data and it works perfectly.

Trust this helps.

ShaneO

There are 10 kinds of people - Those who understand Binary and those who
don't.
Apr 19 '06 #3
ShaneO wrote:

Dim sFileName As String = "C:\Temp\TruckData.txt"
Dim sA As String = File.ReadAllText(sFileName)
Dim X As Integer = 0

Do
X = sA.IndexOf("TruckName=", X)
If X <> -1 Then
X += 11
Debug.Print(sA.Substring(X, 6))
Else
Exit Do
End If
Loop

Oops! Forgot to tell you to add the NameSpace -

Imports System.IO

ShaneO

There are 10 kinds of people - Those who understand Binary and those who
don't.
Apr 20 '06 #4
Shane.

Thanks alot. That worked beautifully.
Excellent.

Thanks again,
Tony
"ShaneO" wrote:
Tony Girgenti wrote:
Hello.

Using VS.NET 2003 VB. If i have a string similar to the attached, how would
i extract the "Truckname=" data from it in a loop and stay in the loop until
the end of the string is reached ? As you can see the first truckname is
"284165". The next truckname is "284193"

Any help would be gratefully appreciated.


Tony, I have made a couple of assumptions with the following code -

1. You are reading data from a file
2. The TruckName data is always 6 chars long

I hope you'll be able to apply what's written here to your specific
requirements.

Dim sFileName As String = "C:\Temp\TruckData.txt"
Dim sA As String = File.ReadAllText(sFileName)
Dim X As Integer = 0

Do
X = sA.IndexOf("TruckName=", X)
If X <> -1 Then
X += 11
Debug.Print(sA.Substring(X, 6))
Else
Exit Do
End If
Loop

I tested it on your supplied data and it works perfectly.

Trust this helps.

ShaneO

There are 10 kinds of people - Those who understand Binary and those who
don't.

Apr 20 '06 #5
And everyone forgets the power of RegEx!!!

This is off the top of my head:

Dim strHtml As String = "Your string here...................."

' Capture the TruckName.
Dim regTruckName As New RegularExpressions.Regex( _
"TruckName\=\""(\d{6})\""", _
Options:=RegularExpressions.RegexOptions.Singlelin e)

Dim m As RegularExpressions.Match

For Each m In regTruckName.Matches(strHtml)
'Trace.WriteLine(strNewLine)
Dim mLink As RegularExpressions.Match

And gives the output of all truck names!
--
|
+-- JDMils
|
"Tony Girgenti" <To**********@discussions.microsoft.com> wrote in message
news:4B**********************************@microsof t.com...
Hello.

Using VS.NET 2003 VB. If i have a string similar to the attached, how
would
i extract the "Truckname=" data from it in a loop and stay in the loop
until
the end of the string is reached ? As you can see the first truckname is
"284165". The next truckname is "284193"

Any help would be gratefully appreciated.

Thanks,
Tony

<TruckConduitDataObject><Truck XVIN="67112637" TruckName="284165"
OrganizationID="1214" OrganizationName="Croydon Dry"
DateOfQuery="2006-04-19T21:56:08.3700000-05:00" IsActive="true"
Odo="1874679.8" OdoAsOf="2006-04-19T20:43:00.0000000-05:00"
FormattedDateTime="04/19/06 04:43p" Axles="2" Berth="false"
HasOnBoardPlatform="true" HasDIU="true" /><Truck XVIN="67112638"
TruckName="284193" OrganizationID="1214" OrganizationName="Croydon Dry"
DateOfQuery="2006-04-19T21:56:08.3700000-05:00" IsActive="true"
Odo="1633058.2" OdoAsOf="2006-04-19T20:21:00.0000000-05:00"
FormattedDateTime="04/19/06 04:21p" Axles="3" Berth="false"
HasOnBoardPlatform="true" HasDIU="true" /><Truck XVIN="67112639"
TruckName="294934" OrganizationID="1214" OrganizationName="Croydon Dry"
DateOfQuery="2006-04-19T21:56:08.3700000-05:00" IsActive="true"
Odo="128325.5" OdoAsOf="2006-04-19T14:43:00.0000000-05:00"
FormattedDateTime="04/19/06 10:43a" Axles="3" Berth="false"
HasOnBoardPlatform="true" HasDIU="true" /><Truck XVIN="67112640"
TruckName="241486" OrganizationID="1214" OrganizationName="Croydon Dry"
DateOfQuery="2006-04-19T21:56:08.3700000-05:00" IsActive="true"
Odo="249414.5" OdoAsOf="2006-04-19T04:00:00.0000000-05:00"
FormattedDateTime="04/19/06 12:00a" Axles="3" Berth="false"
HasOnBoardPlatform="true" HasDIU="true" /><Truck XVIN="67112641"
TruckName="447859" OrganizationID="1214" OrganizationName="Croydon Dry"
DateOfQuery="2006-04-19T21:56:08.3700000-05:00" IsActive="true"
Odo="283377"
OdoAsOf="2006-04-19T20:44:00.0000000-05:00" FormattedDateTime="04/19/06
04:44p" Axles="3" Berth="false" HasOnBoardPlatform="true" HasDIU="true"
/><Truck XVIN="67112642" TruckName="425218" OrganizationID="1214"
OrganizationName="Croydon Dry"
DateOfQuery="2006-04-19T21:56:08.3700000-05:00" IsActive="true"
Odo="86711.9"
OdoAsOf="2006-04-19T20:40:00.0000000-05:00" FormattedDateTime="04/19/06
04:40p" Axles="3" Berth="false" HasOnBoardPlatform="true" HasDIU="true"
/><Truck XVIN="67112662" TruckName="211103" OrganizationID="1214"
OrganizationName="Croydon Dry"
DateOfQuery="2006-04-19T21:56:08.3700000-05:00" IsActive="true"
Odo="185236.2" OdoAsOf="2006-04-19T04:00:00.0000000-05:00"
FormattedDateTime="04/19/06 12:00a" Axles="3" Berth="false"
HasOnBoardPlatform="true" HasDIU="true" /><Truck XVIN="67112667"
TruckName="251638" OrganizationID="1214" OrganizationName="Croydon Dry"
DateOfQuery="2006-04-19T21:56:08.3700000-05:00" IsActive="true" Odo="0"
OdoAsOf="1990-01-01T00:00:00.0000000-06:00" FormattedDateTime="12/31/89
07:00p" Axles="3" Berth="false" HasOnBoardPlatform="false" HasDIU="false"
/></TruckConduitDataObject>

Apr 20 '06 #6
>> And everyone forgets the power of RegEx!!!

Yeah ! This is a perfect candidate for the application of Regex !

Regards,

Cerebrus.

Apr 20 '06 #7
JDMils wrote:
And everyone forgets the power of RegEx!!!

Hmmm... For simplicity, speed and readability I personally don't believe
the RegEx Class was needed in this case, and besides, who among us has
really had the time (or inclination) to learn all the RegEx
Methods/Properties??

Just my opinion!

ShaneO

There are 10 kinds of people - Those who understand Binary and those who
don't.
Apr 20 '06 #8
>> For simplicity, speed and readability I personally don't believe
the RegEx Class was needed in this case
I don't know about the performance comparison between using String
methods and using the Regex engine. I haven't been able to find any
comparisons out there, so if you know of any, please let me know.
besides, who among us has really had the time (or inclination) to learn all the RegEx
Methods/Properties


They aren't that many, you know. And when you do learn them, you will
wield a very powerful tool in your hands !

Regards,

Cerebrus.

Apr 20 '06 #9
Looks like XML to me, so how about taking advantage of that

Dim doc As New System.Xml.XmlDocument
doc.LoadXml(myString)
Dim baseNode As System.Xml.XmlNode =
doc.SelectSingleNode("TruckConduitDataObject")
Dim nodes As System.Xml.XmlNodeList = baseNode.SelectNodes("Truck")

For Each node As System.Xml.XmlNode In nodes
Dim name As System.Xml.XmlAttribute = node.Attributes("TruckName")
If name IsNot Nothing Then
' Do stuff with the name
End If
Next

/claes

"Tony Girgenti" <To**********@discussions.microsoft.com> wrote in message
news:4B**********************************@microsof t.com...
Hello.

Using VS.NET 2003 VB. If i have a string similar to the attached, how
would
i extract the "Truckname=" data from it in a loop and stay in the loop
until
the end of the string is reached ? As you can see the first truckname is
"284165". The next truckname is "284193"

Any help would be gratefully appreciated.

Thanks,
Tony

<TruckConduitDataObject><Truck XVIN="67112637" TruckName="284165"
OrganizationID="1214" OrganizationName="Croydon Dry"
DateOfQuery="2006-04-19T21:56:08.3700000-05:00" IsActive="true"
Odo="1874679.8" OdoAsOf="2006-04-19T20:43:00.0000000-05:00"
FormattedDateTime="04/19/06 04:43p" Axles="2" Berth="false"
HasOnBoardPlatform="true" HasDIU="true" /><Truck XVIN="67112638"
TruckName="284193" OrganizationID="1214" OrganizationName="Croydon Dry"
DateOfQuery="2006-04-19T21:56:08.3700000-05:00" IsActive="true"
Odo="1633058.2" OdoAsOf="2006-04-19T20:21:00.0000000-05:00"
FormattedDateTime="04/19/06 04:21p" Axles="3" Berth="false"
HasOnBoardPlatform="true" HasDIU="true" /><Truck XVIN="67112639"
TruckName="294934" OrganizationID="1214" OrganizationName="Croydon Dry"
DateOfQuery="2006-04-19T21:56:08.3700000-05:00" IsActive="true"
Odo="128325.5" OdoAsOf="2006-04-19T14:43:00.0000000-05:00"
FormattedDateTime="04/19/06 10:43a" Axles="3" Berth="false"
HasOnBoardPlatform="true" HasDIU="true" /><Truck XVIN="67112640"
TruckName="241486" OrganizationID="1214" OrganizationName="Croydon Dry"
DateOfQuery="2006-04-19T21:56:08.3700000-05:00" IsActive="true"
Odo="249414.5" OdoAsOf="2006-04-19T04:00:00.0000000-05:00"
FormattedDateTime="04/19/06 12:00a" Axles="3" Berth="false"
HasOnBoardPlatform="true" HasDIU="true" /><Truck XVIN="67112641"
TruckName="447859" OrganizationID="1214" OrganizationName="Croydon Dry"
DateOfQuery="2006-04-19T21:56:08.3700000-05:00" IsActive="true"
Odo="283377"
OdoAsOf="2006-04-19T20:44:00.0000000-05:00" FormattedDateTime="04/19/06
04:44p" Axles="3" Berth="false" HasOnBoardPlatform="true" HasDIU="true"
/><Truck XVIN="67112642" TruckName="425218" OrganizationID="1214"
OrganizationName="Croydon Dry"
DateOfQuery="2006-04-19T21:56:08.3700000-05:00" IsActive="true"
Odo="86711.9"
OdoAsOf="2006-04-19T20:40:00.0000000-05:00" FormattedDateTime="04/19/06
04:40p" Axles="3" Berth="false" HasOnBoardPlatform="true" HasDIU="true"
/><Truck XVIN="67112662" TruckName="211103" OrganizationID="1214"
OrganizationName="Croydon Dry"
DateOfQuery="2006-04-19T21:56:08.3700000-05:00" IsActive="true"
Odo="185236.2" OdoAsOf="2006-04-19T04:00:00.0000000-05:00"
FormattedDateTime="04/19/06 12:00a" Axles="3" Berth="false"
HasOnBoardPlatform="true" HasDIU="true" /><Truck XVIN="67112667"
TruckName="251638" OrganizationID="1214" OrganizationName="Croydon Dry"
DateOfQuery="2006-04-19T21:56:08.3700000-05:00" IsActive="true" Odo="0"
OdoAsOf="1990-01-01T00:00:00.0000000-06:00" FormattedDateTime="12/31/89
07:00p" Axles="3" Berth="false" HasOnBoardPlatform="false" HasDIU="false"
/></TruckConduitDataObject>

Apr 20 '06 #10
Sorry, noticed you're using 2003. Replace the If statement with the
following:
If Not name Is Nothing Then

"Claes Bergefall" <lo*****@nospam.nospam> wrote in message
news:ON**************@TK2MSFTNGP04.phx.gbl...
Looks like XML to me, so how about taking advantage of that

Dim doc As New System.Xml.XmlDocument
doc.LoadXml(myString)
Dim baseNode As System.Xml.XmlNode =
doc.SelectSingleNode("TruckConduitDataObject")
Dim nodes As System.Xml.XmlNodeList = baseNode.SelectNodes("Truck")

For Each node As System.Xml.XmlNode In nodes
Dim name As System.Xml.XmlAttribute = node.Attributes("TruckName")
If name IsNot Nothing Then
' Do stuff with the name
End If
Next

/claes

"Tony Girgenti" <To**********@discussions.microsoft.com> wrote in message
news:4B**********************************@microsof t.com...
Hello.

Using VS.NET 2003 VB. If i have a string similar to the attached, how
would
i extract the "Truckname=" data from it in a loop and stay in the loop
until
the end of the string is reached ? As you can see the first truckname is
"284165". The next truckname is "284193"

Any help would be gratefully appreciated.

Thanks,
Tony

<TruckConduitDataObject><Truck XVIN="67112637" TruckName="284165"
OrganizationID="1214" OrganizationName="Croydon Dry"
DateOfQuery="2006-04-19T21:56:08.3700000-05:00" IsActive="true"
Odo="1874679.8" OdoAsOf="2006-04-19T20:43:00.0000000-05:00"
FormattedDateTime="04/19/06 04:43p" Axles="2" Berth="false"
HasOnBoardPlatform="true" HasDIU="true" /><Truck XVIN="67112638"
TruckName="284193" OrganizationID="1214" OrganizationName="Croydon Dry"
DateOfQuery="2006-04-19T21:56:08.3700000-05:00" IsActive="true"
Odo="1633058.2" OdoAsOf="2006-04-19T20:21:00.0000000-05:00"
FormattedDateTime="04/19/06 04:21p" Axles="3" Berth="false"
HasOnBoardPlatform="true" HasDIU="true" /><Truck XVIN="67112639"
TruckName="294934" OrganizationID="1214" OrganizationName="Croydon Dry"
DateOfQuery="2006-04-19T21:56:08.3700000-05:00" IsActive="true"
Odo="128325.5" OdoAsOf="2006-04-19T14:43:00.0000000-05:00"
FormattedDateTime="04/19/06 10:43a" Axles="3" Berth="false"
HasOnBoardPlatform="true" HasDIU="true" /><Truck XVIN="67112640"
TruckName="241486" OrganizationID="1214" OrganizationName="Croydon Dry"
DateOfQuery="2006-04-19T21:56:08.3700000-05:00" IsActive="true"
Odo="249414.5" OdoAsOf="2006-04-19T04:00:00.0000000-05:00"
FormattedDateTime="04/19/06 12:00a" Axles="3" Berth="false"
HasOnBoardPlatform="true" HasDIU="true" /><Truck XVIN="67112641"
TruckName="447859" OrganizationID="1214" OrganizationName="Croydon Dry"
DateOfQuery="2006-04-19T21:56:08.3700000-05:00" IsActive="true"
Odo="283377"
OdoAsOf="2006-04-19T20:44:00.0000000-05:00" FormattedDateTime="04/19/06
04:44p" Axles="3" Berth="false" HasOnBoardPlatform="true" HasDIU="true"
/><Truck XVIN="67112642" TruckName="425218" OrganizationID="1214"
OrganizationName="Croydon Dry"
DateOfQuery="2006-04-19T21:56:08.3700000-05:00" IsActive="true"
Odo="86711.9"
OdoAsOf="2006-04-19T20:40:00.0000000-05:00" FormattedDateTime="04/19/06
04:40p" Axles="3" Berth="false" HasOnBoardPlatform="true" HasDIU="true"
/><Truck XVIN="67112662" TruckName="211103" OrganizationID="1214"
OrganizationName="Croydon Dry"
DateOfQuery="2006-04-19T21:56:08.3700000-05:00" IsActive="true"
Odo="185236.2" OdoAsOf="2006-04-19T04:00:00.0000000-05:00"
FormattedDateTime="04/19/06 12:00a" Axles="3" Berth="false"
HasOnBoardPlatform="true" HasDIU="true" /><Truck XVIN="67112667"
TruckName="251638" OrganizationID="1214" OrganizationName="Croydon Dry"
DateOfQuery="2006-04-19T21:56:08.3700000-05:00" IsActive="true" Odo="0"
OdoAsOf="1990-01-01T00:00:00.0000000-06:00" FormattedDateTime="12/31/89
07:00p" Axles="3" Berth="false" HasOnBoardPlatform="false" HasDIU="false"
/></TruckConduitDataObject>


Apr 20 '06 #11
Cerebrus wrote:
For simplicity, speed and readability I personally don't believe
the RegEx Class was needed in this case

I don't know about the performance comparison between using String
methods and using the Regex engine. I haven't been able to find any
comparisons out there, so if you know of any, please let me know.

Like me, I'm sure you can Google to find any number of references to the
performance issues users face with using RegEx.

But as I wrote: "in this case", I feel using in-built String Functions
to achieve the desired result was better than loading an entire Class.
Then there's the time required for the system to construct the regular
expression due to parsing. Also, RegEx maintains explicit stacks for
backtracking which involves many more CPU instructions/cycles for every
processed character when compared to a simple function call stack.

On the point of Parsing - As the RegEx Class caches regular expressions
to try to improve speed there is some debate as to the potential for
memory leaks as it's not clear if/when the cache is purged.

So, in this case, I don't believe RegEx offers a better solution.

ShaneO

There are 10 kinds of people - Those who understand Binary and those who
don't.
Apr 20 '06 #12
Cerebrus wrote:
For simplicity, speed and readability I personally don't believe
the RegEx Class was needed in this case

I don't know about the performance comparison between using String
methods and using the Regex engine. I haven't been able to find any
comparisons out there, so if you know of any, please let me know.

Another point I forgot to mention in my reply:

In your RegEx example, the returned string includes "TruckName=" which
would then require the use of additional String Functions (.Substring /
..Mid) to extract the required six digits.

I'm not in anyway familiar with RegEx, but if the above is true (and I
haven't been able to find a way around it) then why not use String
Functions in the first place? Aren't you just using RegEx for the sake
of using RegEx in this case?

ShaneO

There are 10 kinds of people - Those who understand Binary and those who
don't.
Apr 21 '06 #13
Hi,

Thanks for your enlightening views on this topic.

Ok, I agree with your first point. Since the data is rigid in this
case, it might be better to parse it using String functions, rather
than Regex. If, however there was a chance of the data varying even
slightly, your program would break. Thus, your assumptions are valid in
this case, and I guess there would be a performance gain.
In your RegEx example, the returned string includes "TruckName=" which
would then require the use of additional String Functions (.Substring /
.Mid) to extract the required six digits.


That example was posted by JDMils and not me. And to correct you, he
used a capturing group, by enclosing the \d{6} within parenthesis.
Therefore the six digits would be queried by the Group / Capture
property of the Match object, and you wouldn't have to use additional
string functions like Substring etc. Also, he mentioned that he was
just posting a snippet off the top of his head, and therefore it would
not be fair to use it in a performance comparison test.

Also, repeated runs of the same parsing on this data might be faster,
since the Regex object offers the "Compiled" option.

Regards,

Cerebrus.

Apr 21 '06 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Tim Smith | last post by:
I am looking to extract form element values from html, more generally I have a substring that identifies the beginning of a value and a string that identifies the end of value and I need to extract...
4
by: rdraider | last post by:
Is there a function that will extract part of a string when the data you want does not occur in a specific position? Field "REF" is varchar(80) and contains an email subject line and the email...
3
by: sparks | last post by:
Besides doing a loop is there a command that will give the number of occurreneces of a chr in a string? The only way I can think of is to do a while loop and count variable. thanks for info ...
9
by: Sharon | last post by:
hi, I want to extract a string from a file, if the file is like this: 1 This is the string 2 3 4 how could I extract the string, starting from the 10th position (i.e. "T") and...
4
by: sibingpeter | last post by:
Hi there, Im trying to find the right way to code the loop to count the number of occurences of a given substring in a string. Im able to find the first occurence using the strstr function, but...
3
by: jarod1701 | last post by:
Hi, I'm currently trying to create a regular expression that can extract certain elements from a url. The url will be of the following form: http://user:pass@www.sitename.com I want a...
1
by: Nick | last post by:
Hi, I'm trying to extract element of a directory path stored in the db with substring "/help/support/index/time.jsp" and i want to extract the 1st, 2nd and 3rd parts 1st = help, 2nd =...
1
by: Patrick Sullivan | last post by:
I am trying to extract two parts of a number from an array element. Numbers are in the format of 1.10, 2.50, 11.10, etc. Floor and ceiling won't work right because close to 1.00, I get a zero, and...
3
by: beary | last post by:
Hi, If I have this: Today is a good day Johnny is good Tomorrow will be better Mary is bad Who cares
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
tracyyun
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...
0
agi2029
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,...
0
isladogs
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.