Jump to content
UBot Underground

Recommended Posts

Lets say I have a list of phone numbers,

 

 

http://screencast.com/t/v8JBYdg6

 

 

How would I extract just the phone numbers from that list.  I tried \\(?\\b[0-9]{3}\\)?[-. ]?[0-9]{3}[-. ]?[0-9]{4}\\b but no dice.

 

Tried with columns, variables and list to list. Not sure where I am going wrong with this.

 

add list to list(%phone, $find regular expression($text from list(%list, $new line), "\\(?\\b[0-9]{3}\\)?[-. ]?[0-9]{3}[-. ]?[0-9]{4}\\b"), "Delete", "Global")
 

All tips appreciated

 

Thanks,

 

Rob

Link to post
Share on other sites

found this

 

^(??:\+?1\s*(?:[.-]\s*)?)?(?:\(\s*([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9])\s*\)|([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9]))\s*(?:[.-]\s*)?)?([2-9]1[02-9]|[2-9][02-9]1|[2-9][02-9]{2})\s*(?:[.-]\s*)?([0-9]{4})(?:\s*(?:#|x\.?|ext\.?|extension)\s*(\d+))?$
Link to post
Share on other sites

No luck with that either. Here is the code I am using:

 

add item to list(%list, $scrape attribute(<tagname="strong">, "innertext"), "Delete", "Global")
 

add list to list(%phone, $find regular expression($text from list(%list, $new line), "^(?:(?:\\+?1\\s*(?:[.-]\\s*)?)?(?:\\(\\s*([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9])\\s*\\)|([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9]))\\s*(?:[.-]\\s*)?)?([2-9]1[02-9]|[2-9][02-9]1|[2-9][02-9]{2})\\s*(?:[.-]\\s*)?([0-9]{4})(?:\\s*(?:#|x\\.?|ext\\.?|extension)\\s*(\\d+))?$"), "Delete", "Global")
 

and the url http://www.lawyers.com/consumer-law/california/all-cities/law-firms-p.html?N=0&r=0&sort=0

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...