Can anybody tell how can we extract the current page and total pages value from the expression "Page 4 of 15"? One of the ways that i can think of is using split function but what can be the other ways of doing it?
Ways to perform extraction
|
06-04-2012, 12:22 PM
Are there any ideas to share by anybody?
06-04-2012, 06:45 PM
Hi AAB,
We can do it using regular expression too. Checkout the below code Code: input = "Page 22432 of 201222122" Let me known if you have any questions.
Thanks,
SUpputuri
06-05-2012, 12:36 PM
Hi supputuri,
Thanks for your help.It gave me another way to look at these matching/extraction issues. Then i Tried this: strlocation="D:\Documents and Settings\Desktop\New Folder" Objective: To extract the folder name and the file path from the above location. For the folder name i tried the following code: '*********************************** Code: Set obj=New Regexp Here the problem that i came across is that if i use the pattern as "[A-Z a-z]*$" then it gives two values in the match collection returned by Execute which are :"New Folder" and "". So then i changed the pattern to "[A-Z a-z ]*$" and it gave me the correct result but the question is by looking at the input it seems that no additional space is there then why is it required in the regular expression?Please clarify.
06-05-2012, 09:05 PM
Hi I did not find any difference by using the specified patterns.
but change the obj.global = False we will get the correct value.
Thanks,
SUpputuri |
« Next Oldest | Next Newest »
|
Possibly Related Threads… | |||||
Thread | Author | Replies | Views | Last Post | |
Alternate ways to input data | Silpa | 7 | 5,385 |
03-09-2012, 09:28 AM Last Post: Silpa |
|
Perform Action on Browser using only VBScript | bfakruddin | 2 | 2,755 |
09-08-2010, 06:57 PM Last Post: cdesserich |
|
How to perform the Filter action in excel using vb script? | venkatbatchu | 6 | 31,622 |
10-08-2009, 03:05 PM Last Post: venkatbatchu |
|
How many ways we can use external XL sheet data import in to runtime datatable | govqa | 1 | 3,465 |
02-18-2009, 11:09 PM Last Post: sreekanth chilam |
Users browsing this thread: 1 Guest(s)