Sunday 30 September 2018

Regular Expression in RPA

In RPA, have you ever been in any situation where you have to deal with some phone no, mail address or web links in between some context and you have to capture that pattern from that context.

Regular expression(RE)  is the best practice for such scenario. RE is a sequence of character that determine the search pattern. This make the task very easy to capture some pattern from any context.

If RPA developer have an idea of Meta Characters then it will make his life very easy.
Some essential patterns.

Mail: [\w.]+@\w+\.(net|com|edu)

Date: (\d{1,2}\/\d{1,2}\/\d{1,4})
pattern like. 21/3/2018

Image: ([^\S]+(?=\.(jpg|gif|png))\.\2)

Phone no: \(?\d{3}[-.)]\d{3}[-.]\d{4}
paterns like.
123-555-4444
123.555.4444
(123)555-4444

weblink: \[.*?\]\(https.*?\)
patterns like.
[Google](https://Google.com)

If you have some other patterns and it's RE then do share in comment.

4 comments:

  1. I think things like this are really interesting. I absolutely love to find unique places like this. It really looks super creepy though!! rpa fees in chennai

    ReplyDelete
  2. Hi Kishan,

    we need your support for passing wildcards for the below string pattern

    /ctxt/COCKPIT/SHDR_DISP-AP_ACTION

    can you please help?

    Thanks,
    Srikanth

    ReplyDelete
  3. Hi Kishan,

    Below is the complete string pattern

    /app/con[0]/ses[0]/wnd[0]/usr/subSUB_MAIN:/COCKPIT/SAPLDISPLAY46:0381/subSUB_HDR:/COCKPIT/SAPLDISPLAY46:0405/tabsG_STRIP_HDR/tabpTAB5/ssubSUB:/COCKPIT/SAPLDISPLAY46:0436/ssubSUB_OTHERS:%_T01F3J:0200/ctxt/COCKPIT/SHDR_DISP-AP_ACTION

    Could you please help?

    Thanks,
    Srikanth

    ReplyDelete
  4. our requirement is to pass wildcards in the place of 0381 and T01F3J. please help

    Thanks,
    Srikanth

    ReplyDelete