18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

Regular expressions

arunbalaarunbala Members
edited February 2012 in Sahi - Open Source
Hi narayan,
we are sill not clear with regular expressions. how to compare the values using regular expressions.
eg: string i have to pattern: "ghjggjhhghg #453664."
for this how can i do the expressions and how to compare.
i have used,
Var $str = .*[0-9][0-9][0-9][0-9][0-9][0-9].;
_assertEqual(new regExp($RegErr), _getText(_span("ctl00_cphClientBody_lblPopUpMessage")));

i got error.. like this

ERROR [110 ms]
missing ; before statement

pls fix this pblm
thnx

Comments

  • globalwormingglobalworming Moderators
    edited February 2012
    Hi again

    there are a lot of asserts possible in sahi... there should be some asserts which can handle regular expressions.. but for now you could just use _assertNotNull("ghjggjhhghg #453664.".match("[0-9]{5}"))
Sign In or Register to comment.