I have this regular expression that I wrote, which extracts text in between tags like "#<string to extract>"
:
"#<(.+?)>"
I need to make sure that the length of the string I'm extracting is 6 and my current solution is checking the length of the string that I extracted with an if
statement. I would like to replace this with a regex instead. How could I modify "#<(.+?)>"
to make sure it is 6 characters when extracted?