What is the name of function in Citrix protocol of LoadRunner to capture the text with the help of regular expression?
Please give a example.
Because of the way Citrix protocol works you currently have no way to "search" for text with regexp or otherwise. Your only options are the ctx_get_text steps, each using a different method to try and retrieve the text. If you think that something like regexp search is a useful feature please suggest it as an ER.
Related
I am using azure search in my bot application.
In this if we give input with spelling mistake, for small words like trvel => travel we are getting response properly.
But if i enter "travelexpense" for this i am not getting any result.
Currently i am passing input to do fuzzy search.
I have suggested to use Bing Spell Check API, but it is not approved as they think our input may be stored outside.
Is there any option available in azure search to correct the words like "travelexpense".
Is there any option available for this scenario?
The closest I would say is a phonetic Analyzer.
https://learn.microsoft.com/en-us/azure/search/index-add-custom-analyzers
There a couple of other things you can try:
Enable Auto Complete and Suggestions (https://learn.microsoft.com/en-us/azure/search/search-autocomplete-tutorial)
Create synonyms (https://learn.microsoft.com/en-us/azure/search/search-synonyms)
I'm not usually using Agent in Lotus Notes because I always Lotusscript button only. But recently I need to do a function in Lotus Notes using using an Agent. So in some of an Agent, I found this:
Option Public
Option Declare
Use "ParametersMaster"
Use "CommonFunctions"
Use "Class.QueryString"
Some Lotusscript code...
I don't really understand what are the functions of these "Use" and where to find them. I know this is kinda simple question and I would like somebody help me on this to understand what it is. Thanks!
The "Use" commands loads external script libraries. Usually these script libraries are found in the same database under the Script Libraries design elements.
Refer to the Help in Designer for a much better answer 😀
I have an existing email address validation Regex and am looking for an additional Regex function that will also NOT match if the sample ends with .ocm.
The reason for this request is to provide additional data entry validation to prevent the most common typo we encounter: .ocm instead of .com.
For example, blah#somewhere.com should return a match, but blah#somewhere.ocm should not.
I'm afraid I don't know what flavor of Regex I'm using, as it's in a black box proprietary application that "accepts Regex" for user input validation. I do know that the application is probably written in VB6 if that helps at all.
Here is the existing Regex, which works well for its intended purpose:
^(?=[a-zA-Z0-9][a-zA-Z0-9#._%+-]{5,253}$)[a-zA-Z0-9#._%+-]{1,64}#(?:(?=[a-zA-Z0-9-]{1,63}\.)[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*\.){1,8}[a-zA-Z]{2,63}$
The sample will always be a greater-than-zero-length string, so it doesn't matter if these aren't handled.
It seems that a negative lookbehind at the end of the Regex should be the best method, but I can't find the correct syntax to make this work with my existing Regex.
Here are some methods that might work if someone could kindly suggest how to integrate them with my existing Regex:
https://stackoverflow.com/a/406408/6195684
https://code.i-harness.com/en/q/fa3887
https://stackoverflow.com/a/11432373/6195684
Thanks kindly in advance.
Just add a negative lookahead as shown below:
(?!.*[.]ocm$)
This is the original regex.
This is the modified regex.
Suppose I have a huge set of noisy phrases. For each one of them, I want to check if it is defined by some resources by using the google define feature. Once I type "define my_phrase" to the google search box, if the retrieved results contain the definition panel (e.g. https://www.google.com/#q=define+home+cooking), I put it into my phrase pool.
I'm wondering is this possible to do this task in a batch so that I don't have to type each of the phrase manually one by one? It would be great if this could be achieved from a unix terminal but windows is also welcome!
I heard of google-app-engine but I only have a rough idea and not sure if it could help.
Thanks!
as starting point, you may try and play with the Google Custom search following API reference - Xml results
https://developers.google.com/custom-search/docs/xml_results?hl=en&csw=1#XML_Results
Be aware of:
google TOS for this service
quantity courtesy limit
I have to update old projects at work. I do not have any experience with classic asp, although i'm familiar with php scripting.
Are there any functions I should use?
Can you provide me with a good function for some basic protection?
Is there something like a parameterized query in asp?
Thanks!
Yes you can use parametrized queries in classic ASP (more accurately, classic ADO).
Here is a link.
As for encoding output, I might be tempted to create a wrapper for the latest Microsoft Anti-XSS library and call it with Server.CreateObject. I am far from an expert on this kind of thing as I spend much more time in .Net, so I only think this would work.
Server.HTMLEncode is really not good enough, as it only blacklists a few encoding characters. The Anti-XSS library is much better as it whitelists what is acceptable.
Always use Server.HTMLEncode to sanitize user input.
For example, if you're setting a variable from a form text box:
firstName = Server.HTMLEncode(trim(request.form("firstname")))
Watch out for SQL injection. Do not concatenate user input to a SQL string and then execute it. Instead, always used parameterized queries.
There is a bunch of functions starting with Is, such as IsNumber, IsArray etcetera, that might be of interest. Also if you're expecting a integer, you could use CLng(Request("blabla")) to get it, thus if it's not a integer the CLng function will raise an error.
One way to do it might be to add a check in a header.asp file that iterates through the Request object looking for inappropriate characters. For example:
<%
for each x in Request.Form ' Do this for Request.Querystring also
If InStr(x,"<") <> 0 Then
' encode the value or redirect to error page?
End If
next
%>