EDIT: After clicking submit on this post, I had an inspiration that because I was breaking a string across multiple lines of code, I needed to close the quotes appropriately. Using the code below, I got my .Pattern to work:
![]()
Please Login or Register to view this content.
I'm posting it here for those who might also have the same question, but not be fortunate enough to have the inspiration I did.
Hi all,
I feel like this is a simple problem, but I've been unable to fix it. I'm using a Regular Expression object with a pretty long .Pattern. I want my code to be readable, so I'd like to take the long .Pattern and break it onto 2 lines, like I would w/ any other long lines of code. Here's my regular expression:
![]()
Please Login or Register to view this content.
My assumption would be to pick the spot to break it, do a space and an underscore, then new line and tab, like this:
![]()
Please Login or Register to view this content.
However, that's an incorrect syntax at runtime. What's the trick here that I'm missing? How does one make a long .Pattern span multiple lines of code?
Thanks,
Adam
Bookmarks