Monday, May 21, 2012

Using Regular Expressions with Oracle BPEL


Using Regular Expressions with Oracle BPEL:

Sometimes we may have to validate the data based on the Regular Expressions.

xp20:matches() is a function which can be used to compare data with regular expressions. This function returns true when the input matches the given expression.

xp20:matches(intputString, regexPattern)
  • inputString - The input string
  • regexPattern - The regular expression pattern

Validation of numeric fields :

xp20:matches(bpws:getVariableData('inputString'),'^[0-9]*$')=true()

Validation of alpha fields :

xp20:matches(bpws:getVariableData('inputString'),'^[A-Za-z]*$')=true()

Validation for list of values:

xp20:matches(bpws:getVariableData('inputString'),'^(A|B|C|D)$') =true()

The matches function returns true if inputString variable contains any one of these values (A, B, C, and D).

The expression can be replaced with other regular expressions for similar comparisons.


20 comments:

  1. Cloud has beome the common word that is being used by most of the professional these day. The reason for relying on this technology is security. Your content too lecture the same. Thanks for sharing this worth able information in here. Keep blogging article like this.

    Hadoop Training Chennai | Hadoop Training in Chennai | Big Data Training

    ReplyDelete
  2. Really awesome blog. Your blog is really useful for me. Thanks for sharing this informative blog. Keep update your blog.
    Oracle Training In Chennai

    ReplyDelete
  3. I am reading ur post from the beginning, it was so interesting to read & i feel thanks to you for posting such a good blog, keep updates regularly.Best Hadoop Training Institute In Chennai

    ReplyDelete
  4. Your posts is really helpful for me.Thanks for your wonderful post. I am very happy to read your post. It is really very helpful for us and I have gathered some important information from this blog. hybris training in hyderabad

    ReplyDelete
  5. In the particular article You might understand how for getting started building net applications IOS Applications Development

    ReplyDelete
  6. Nice concept. This is useful. Thanks for sharing.

    Wordpress development in chennai

    ReplyDelete
  7. The strategy you have posted on this technology helped me to get into the next level and had lot of information in it. The Struts, Spring, Hibernate are the advanced level of programming language which are most widely used.
    spring training in chennai | spring hibernate training in chennai

    ReplyDelete
  8. The blog you presented was very nice and interesting which helped me to get update on the recent technologies.
    Angularjs training in chennai | Angularjs course in Chennai

    ReplyDelete
  9. Good post. happy to visit your blog. Thanks for sharing.

    seo training in Chennai

    ReplyDelete
  10. Glad to find this post, thanks for sharing such informative articles - LoadRunner Training in Chennai

    ReplyDelete
  11. Thanks for sharing this informative Articles ! Keep updating your blog -Oracle Apps Finance Training in Chennai

    ReplyDelete
  12. The strategy you posted was nice. The people who want to shift their career to the IT sector then it is the right option to go with the ethical hacking course.
    Ethical hacking course in Chennai | Ethical hacking training in chennai

    ReplyDelete
  13. I have been reading out a lot of your articles and that i ought to say pretty nice stuff. I will certainly bookmark your internet website
    Devops Online Training

    ReplyDelete
  14. Wonderful blog.. Thanks for sharing informative blog.. its very useful to me..

    iOS Training in Chennai

    ReplyDelete
  15. Nice post. Very interesting to read. Thank you for Sharing.
    erp in chennai

    ReplyDelete