Explorar el Código

Missed template -> library rename

tags/v0.2.0
Garrick Aden-Buie hace 8 años
padre
commit
0cc66bea8e
Se han modificado 2 ficheros con 9 adiciones y 3 borrados
  1. +1
    -2
      R/regex_gadget.R
  2. +8
    -1
      inst/extdata/patterns.json

+ 1
- 2
R/regex_gadget.R Ver fichero

@@ -233,7 +233,6 @@ regex_gadget <- function(text = NULL,
})

observeEvent(input$library_show, {
browser()
showModal(
modalDialog(
title = "Regex Library",
@@ -267,7 +266,7 @@ regex_gadget <- function(text = NULL,
})

observeEvent(input$library_apply_pattern, {
updateTextInput(session, "pattern", value = this_template()$regex)
updateTextInput(session, "pattern", value = this_pattern()$regex)
updateSelectInput(session, "template", selected = "")
removeModal()
})

+ 8
- 1
inst/extdata/patterns.json Ver fichero

@@ -67,12 +67,19 @@
"source":"https://projects.lukehaas.me/regexhub"
},
{
"name":"Web, URL",
"name":"Web, URL Simple",
"regex":"((https?|ftp|file)://)?([\\w\\d.-]+)\\.([a-zA-Z.]{2,6})([-/.a-zA-Z0-9]+)*/?",
"description":"Match URL with optional protocol, e.g. <code>yahoo.com</code> or <code>https://yahoo.com/finance</code>. (Validation only, may have high false positives.)",
"tags":"url,address,http",
"source":"https://projects.lukehaas.me/regexhub"
},
{
"name":"Web, URL Extended",
"regex":"(?:(?:http(?:s)?|ftp)://)(?:\\S+(?::(?:\\S)*)?@)?(?:(?:[a-z0-9\u00a1-\uffff](?:-)*)*(?:[a-z0-9\u00a1-\uffff])+)(?:\\.(?:[a-z0-9\u00a1-\uffff](?:-)*)*(?:[a-z0-9\u00a1-\uffff])+)*(?:\\.(?:[a-z0-9\u00a1-\uffff]){2,})(?::(?:\\d){2,5})?(?:/(?:\\S)*)?",
"description":"More complicated URL validation that handles URLs such as <code>http://www.example.com/wpstyle/?p=364</code>, <code>http://foo.com/blah_blah_(wikipedia)_(again)</code>, or even <code>http://userid:password@example.com:8080/</code>.",
"tags":"url,address,http",
"source":"http://rpubs.com/jimhester/rex-url_parsing"
},
{
"name":"Network, IPv4 Address",
"regex":"(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",

Cargando…
Cancelar
Guardar