Skip to content

mahesh2492/Extractor-and-Regex-assignement

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Extractor-and-Regex-assignement

Aim: Implement the following problems descriptions.

Problems:

  1. Complete Extractor definition for URL parsing.

object URL{

def apply(protocal:String,domain:String,path:String, params:Map[String,String]):String = { //definition }

def unapply(url:String):Option[(String , String, String,Map[String,String])] = { //definition }

}

Description : val url = “https://aws.amazon.com/console/home?state=hash&isauthcode=true&code=112”

Extract following fields: protocal =” https” domain = “aws.amazon.com” path =”/console/home” params = Map(“state” -> “hash”, “isauthcode” -> “true”, “code” -> 112)

  1. Write regular expression for email parsing. Description : val EMAIL = “ regular expression definition”.r val EMAIL(user, domain) = “knol@knoldus.com” user = knol domain = knoldus.com

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages