Thanks everybody for your replies. Actually I was able to resolve the same
in the night itself after long effort.
@byzoor: I appreciate your effort. Thanks a lot. Actually may be I missed to
post one thing in the problem that the variable was coming from excel file
and I did it as shown below:
*mappingFile = "C:\Shalabh\Automation
Framework\Templates\New_Mapping_Template.xls"
Set objxlApp = createobject("Excel.Application")
Set objxlwbook = objxlApp.Workbooks.Open(mappingFile)
Set objxlwsheet = objxlwbook.Worksheets("Sheet1")
irows = objxlwsheet.UsedRange.Rows.Count
For i=2 to irows
strvar = cstr(objxlwsheet.cells(i,"D").value)
arr = trim(replace(strvar,chr(34),chr(32)))
st = 1
en = 1
Do
st = instr(en, arr, " *", 1)
en = instr(st, arr, "* ", 1)
str = mid(arr,st+2,en-st-2)
print str
Loop until instr(en, arr, " *", 1)=0
Next
*
Regards
Shalabh Dixit
On Tue, Jun 14, 2011 at 10:04 PM, Mason Foley <[email protected]> wrote:
> Shouldn't the internal quotes be escaped? For example:
>
> string =
> Main.NetPriceMapping(\"*price.*\")Lookup.SupplementLookup(\"*dia-supp.*\")Lookup.ProductFulfillmentInput
> (\"*fulfillment.*\")
>
> On Tue, Jun 14, 2011 at 12:21 PM, Shalabh Dixit
> <[email protected]>wrote:
>
>> Hi,
>>
>> Can anybody please help me in removing the double quotes from the
>> following string:
>>
>> string = Main.NetPriceMapping("*price.*")Lookup.SupplementLookup("*dia-
>> supp.*")Lookup.ProductFulfillmentInput ("*fulfillment.*")
>>
>> This is one complete string and I need to fetch the following from the
>> above string:
>> Output Required:
>> --------------------
>> price
>> dia-supp
>> fulfillment
>> --------------------
>> I'm using the following code but not able to build the string
>> successfully as it is showing the syntax errors due to so many double
>> quotes:
>>
>> Dim strMyVariable
>> strMyVariable = "Main.NetPriceMapping
>> ("*price.*")Lookup.SupplementLookup ("*dia-
>> supp.*")Lookup.ProductFulfillmentInput ("*fulfillment.*")"
>>
>> strMyVariable = Replace(strMyVariable, Chr(34), Chr(32))
>>
>> MsgBox "Output :: " & Trim(strMyVariable)
>>
>> --------------------
>> Thanks
>> SHALABH DIXIT
>>
>> --
>> You received this message because you are subscribed to the Google
>> "QTP - HP Quick Test Professional - Automated Software Testing"
>> group.
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]
>> For more options, visit this group at
>> http://groups.google.com/group/MercuryQTP?hl=en
>>
>
> --
> You received this message because you are subscribed to the Google
> "QTP - HP Quick Test Professional - Automated Software Testing"
> group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/MercuryQTP?hl=en
>
--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en