LoadRunner regular expressions

LoadRunner regular expressions

I have a real challenge for LoadRunner specialists, professionals, and gurus.
I would like to start new public investigation on LoadRunner regexp (regular expressions).
The reward is $52.25.

As you know, LoadRunner supports limited and 'light' regular expressions. These are special text flags of web_reg_save_param function to support 'light' LoadRunner regular expressions:
  • /DIG interprets the pound sign (#) as a wildcard for a single digit.
    For example, "te##xt" matches for "te23xt", and doesn't match for "text" and "te234xt".
  • /ALNUM interprets the caret sign (^) as a wildcard for a single US–ASCII alphanumeric character.
    There are three syntaxes: ALNUMIC to ignore case, ALNUMLC to match only lower case, and ALNUMUC to match only upper case.
    For example, with ALNUMLC flag enabled, "te^^xt" matches for "tenext", and doesn't match for "teNext" and "teneoxt".
The task is simple:
How to use real regular expressions in LoadRunner with C language?

Note: you can use real regexps with VBScript or Java. With standard LoadRunner C language this is not easy task!
I tried to use PCRE, but LoadRunner generated memory exception.

All I want is to process regexp templates, like:
  • (\w+)@(\w+)\.(\w+)
  • test.*
  • ^91[a-z]$
  • Windows(?=95 |98 |NT|XP)
  • and so on
If you be share hot to use regular expressions in LoadRunner, I will pay to you $52.25 (money I earned with this blog during March 2008).
I think, such use of money will be honest. My readers helped me to earn them, and I plan to investigate them to resolve LoadRunner community question.

Well, if you have ideas on LoadRunner regular expressions, please describe them on your site or blog and send me the link.

Let's work together!

Waiting for your solutions & comments.
Thank you, LoadRunner beginners & professionals.

Updated (27/04/08):
LoadRunner RegExp - Challenge resolved

--
Dmitry Motevich

6 comments:

Anonymous said...

Here you go, Dmitry

Let me know if it works for you. If it does, please donate the money to the Free Software Foundation

Dmitry Motevich said...

Thank you, Charlie!

It seems, that your solution will works correctly. I need time to check.

You are the first person who sent the solution. That's why you have all chances to be a winner! :) Congratulations!

I will try to check your approach and I will write an article about it by the end of this week.

Regarding money, I will donate the sum ($52.25) to FSF and will send screenshots which confirm my donation.
Actually, I've never donated money to FSS. So, if link to donation be available, I will send it too.

Thank you again for cooperation!

Unknown said...

Nice work Charlie. I abstracted a little to call a match function with one line from an action, using the example code you provided ... Which by the way works like a charm!

It would be good if we could take it one step further and manipulate the string buffer with search & replace functionality like we do in Perl ie. s/foo/bar/

But not sure if it's possible with GnuWin32. Thanks for posting the challenge Dmitry and shedding some light on this functionality :)

sridhar said...

hi Dmitry,

Thanks for your posts related to loadrunner.These posts are very useful. i am requesting you to publish the post regarding framework in LoadRunner on your blog....

Thanks
Sridhar

Sridhar said...

Hi Dmitry,
I read your post on memory leak. i just want to know that memory leak is related to which component.i.e., system, app server, web server or database server.
what are the counters we need to consider to detect memory leak? Are these counters are component specific? if so, what are the counters of each and every component(mentioned above) that we need to consider while detecting memory leak?

Thanks & Regards
Sridhar

Sridhar said...

Hi Dmitry,
I have one confusion on concurrent users and simultaneous users.Plz describe the difference. If i want to do load test with 100 simultaneous users using LR what are the settings that i need to do? I know that the users we are using are concurrent users... plz clarify me on these two things.
Thanks & Regards
Sridhar
sridhar.k151@gmail.com