Methods Reference Regular Expression Methods Siebel eScript Language Reference

Methods reference regular expression methods siebel

This preview shows page 203 - 205 out of 334 pages.

Methods Reference Regular Expression Methods Siebel eScript Language Reference Version 8.1, Rev. A 203 Example 2 The following example calls the Get Regular Expression from String method from a regular expression whose global attribute is set. This method returns all matches that exist of the primary pattern in a string of the regular expression, including matches that overlap: function fn () { var str = "ttttot tto"; var pat = new RegExp("t.t", "g"); var resultmsg = ""; while ((rtn = pat.exec(str)) != null) { resultmsg = resultmsg + "Text = " + rtn[0] + " Pos = " + rtn.index + " End = " + (pat.lastIndex - 1) + "\n"; pat.lastIndex = rtn.index + 1; } TheApplication().RaiseErrorText(resultmsg) } fn (); This example provides the following output: Text = ttt Pos = 0 End = 2 Text = ttt Pos = 1 End = 3 Text = tot Pos = 3 End = 5 Text = t t Pos = 5 End = 7 Related Topics For more information, see the following topics: “Get Character From String Method” on page 93 “Is Regular Expression in String Method” on page 203 Is Regular Expression in String Method The Is Regular Expression in String method determines if a string includes a regular expression. It returns one of the following values: If the string includes a regular expression, then it returns the following value: True If the string does not include a regular expression, then it returns the following value: False This method uses the same arguments as the Get Regular Expression from String method. For more information, see Table 117 on page 201 . Format regexp .test( str )
Image of page 203
Siebel eScript Language Reference Version 8.1, Rev. A Methods Reference Siebel Library Methods 204 Usage The Is Regular Expression in String method is equivalent to regexp .exec( str )!=null. Usage for this method with T eScript code is the same as usage for the Get Regular Expression from String method. For more information, see “Using the Get Regular Expression from String Method with the T eScript Engine” on page 202 . You can use the Is Regular Expression in String method with the g global attribute set on the regular expression instance. This functionality uses the lastIndex property in the same way as the Get Regular Expression from String method. For more information, see “Usage With Setting the Global Attribute” on page 201 . Example The following example includes the Is Regular Expression in String method: var str = "one two three tio one"; var pat = /t.o/; rtn = pat.test(str); // Then rtn == true. Siebel Library Methods This topic describes the Siebel library methods that Siebel eScript uses to call external libraries and applications. It includes the following topics: “Siebel Library Call DLL Method” on page 204 “Siebel Library Get Pointer Address Method” on page 209 “Siebel Library Peek Method” on page 210 “Siebel Library Write Data Method” on page 211 Siebel Library Call DLL Method The Siebel Library Call DLL method calls a procedure from a dynamic link library in Microsoft Windows or a shared object in UNIX. It returns an integer.
Image of page 204
Image of page 205

You've reached the end of your free preview.

Want to read all 334 pages?

  • Summer '16
  • Oracle
  • Type system, Siebel, Siebel eScript

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes