Jump to content
UBot Underground

Simple Regex Help


Go to solution Solved by bestmacros,

Recommended Posts

.*\s.*\s.*\s(?=categoryId)

or

(.*\s){3}(?=categoryId)

 

thank you what if if i have more than 3 keywords just like this  i am trying to get tags from here like this

 

"channelTitle": "Marques Brownlee",
    "tags": [
     "RED Hydrogen One",
     "RED Hydrogen",
     "RED Hydrogen One review",
     "RED Hydrogen Review",
     "RED smartphone",
     "MKBHD",
     "RED phone",
     "holographic phone",
     "holgraphic smartphone",
     "holographic machine",
     "holographic media machine",
     "RED camera",
     "RED phone camera",
     "RED phone vs",
     "RED Hydrogen vs",
     "4-view",
     "h4v",
     "holopix"
    ],
    "categoryId": "28",
    "liveBroadcastContent": "none",
Link to post
Share on other sites

Please let me know if the content you are trying to parse is in json or xml format ? if so then there is a precise way to parse data

 

its youtube api i am trying to get those tags  from here example

 

"channelTitle": "Marques Brownlee",
    "tags": [
     "RED Hydrogen One",
     "RED Hydrogen",
     "RED Hydrogen One review",
     "RED Hydrogen Review",
     "RED smartphone",
     "MKBHD",
     "RED phone",
     "holographic phone",
     "holgraphic smartphone",
     "holographic machine",
     "holographic media machine",
     "RED camera",
     "RED phone camera",
     "RED phone vs",
     "RED Hydrogen vs",
     "4-view",
     "h4v",
     "holopix"
    ],
    "categoryId": "28",
    "liveBroadcastContent": "none",
Link to post
Share on other sites
  • Solution

try this:

(?<=\"tags\"\:\s\[\s)(.*\s)*(?=\])

 

its youtube api i am trying to get those tags  from here example

 

"channelTitle": "Marques Brownlee",
    "tags": [
     "RED Hydrogen One",
     "RED Hydrogen",
     "RED Hydrogen One review",
     "RED Hydrogen Review",
     "RED smartphone",
     "MKBHD",
     "RED phone",
     "holographic phone",
     "holgraphic smartphone",
     "holographic machine",
     "holographic media machine",
     "RED camera",
     "RED phone camera",
     "RED phone vs",
     "RED Hydrogen vs",
     "4-view",
     "h4v",
     "holopix"
    ],
    "categoryId": "28",
    "liveBroadcastContent": "none",

 

Link to post
Share on other sites

That looks like a JSON response, for that you can use this plugin: http://network.ubotstudio.com/forum/index.php/topic/16166-free-plugin-jsonpath-parser-plugin/

 

You could use regex for this but using a JSON parser to parse JSON makes more sense.

Link to post
Share on other sites

That looks like a JSON response, for that you can use this plugin: http://network.ubotstudio.com/forum/index.php/topic/16166-free-plugin-jsonpath-parser-plugin/

 

You could use regex for this but using a JSON parser to parse JSON makes more sense.

 

As it has parsing problems:

http://network.ubotstudio.com/forum/index.php/topic/16166-free-plugin-jsonpath-parser-plugin/?p=131554

 

I use EXB plugin instead. Dan did a great job by adding two VERY useful functions to EXB for parsing JSON data.

  • Like 1
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...