View source: R/inspect_characterid.R
inspect_characterid | R Documentation |
Check whether a given string matches a specified pattern using regular expressions (regex). The string is assumed to be a code (e.g., a SGIC), which should follow a predefined format.
inspect_characterid(code, pattern)
code |
A character string containing a SGIC or similar code that should follow a predefined format. |
pattern |
A character string specifying the expected pattern using regular expressions (regex). The pattern defines the format 'code' should match. |
A logical value: 'TRUE' if the code matches the expected pattern, otherwise 'FALSE'
inspect_characterid("ABC1234", "^[A-Za-z]{3}[0-9]{4}$") #TRUE - Matches the pattern
inspect_characterid("12DBG45FG", "^[A-Za-z]{3}[0-9]{4}$") #FALSE - Does not match the pattern
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.