summaryrefslogtreecommitdiffstats
path: root/regexp.c
diff options
context:
space:
mode:
Diffstat (limited to 'regexp.c')
-rw-r--r--regexp.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/regexp.c b/regexp.c
index ffaa1fc..c1706fb 100644
--- a/regexp.c
+++ b/regexp.c
@@ -2,6 +2,13 @@
int main(int argc, char **argv)
{
+ char *line = " <img src = \"bro.png\" > ";
+ char url[256] = { 0 };
+ //sscanf(line, "<a href=\"%[^\"]\">", url);
+ /* note: i love putting space in sscanf string, it treats them as one or more spaces */
+ if (sscanf(line, " <%*[(a|img)] %*[(href|src)] = \"%[^\"]\">", url))
+ puts(url);
+
char name[50 + 1], email[50 + 1];
char *string = "\"Bro Brotato\" <bro@hax.org>";