Can dates be recognised?

activities

#1

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


#2

Try wit.ai

image


#3

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


#4

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


#5

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

Example here: https://regexr.com/3tr49

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

image

Group 2 will contain “119” as desired.


#6

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


#7

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


#8

goto settings menu, there you can find this,

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


#9


#10

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

My authorization is empty @ddrdushy1


#11

https://wit.ai/faq


#12

it takes some time


#13


I am still not sure how to get the application bearer


#14

try this,


#15

@ddrdushy1 I tried what u suggested but no difference



#16

once logout and login. it may generate the token


#17

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


#18

click on the highlighted area

click validate and try the request again


#19

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


#20

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