Can dates be recognised?

My string is “(New Paper) Aug 2018 119 KG(s)”
I would like to get that number after the date. Thus, I would like to know if dates recognized in uipath. If not, any ways for me to get ‘119’ number dynamically.

Thank you xoxo

Try wit.ai

image

1 Like

Hi @ddrdushy1
I tried what u said, but i am abit confused. How to integrate that to uipath

this is an API which helps you to identify, use http request activity

If your string is in a constant format, you can try using regex.

Example here: RegExr: Learn, Build, & Test RegEx

)\s(\w{3}\s\d{4})\s(\d*)\s

image

Group 2 will contain “119” as desired.

I tried your suggestion : System.Text.RegularExpressions.Regex.Replace(str,“)\s(\w{3}\s\d{4})\s(\d*)\s”)
I get an error, object reference needed

Your method seems workable and interesting. But a doubt, i need to enter a url to get result from.
https://wit.ai/sangasangasanga/MyFirstApp/entities/datetime
However, above is not in json format.
Thus, i get this

goto settings menu, there you can find this,

image

use this to make request. can’t get JSON data in web scraping. use this CURL request

1 Like

curl
-H 'Authorization: Bearer ’
https://api.wit.ai/message?v=20180813&q=

My authorization is empty @ddrdushy1

https://wit.ai/faq

it takes some time


I am still not sure how to get the application bearer

try this,

image

@ddrdushy1 I tried what u suggested but no difference


once logout and login. it may generate the token

@ddrdushy1 You were right I got it after logging out and in. But my response isn’t right

click on the highlighted area

click validate and try the request again

@ddrdushy1 It works. Thanks alot for guiding me through it. But i face another problem: why doesn’t the tostring works

you receiving a JSON value. use JSON activities(install uipath web activities package ) to extract the data.