Closed abhijeet9920 closed 4 years ago
Hey @abhijeet9920 , Thanks for your willingness in helping with adding expressions.
As far as I can see the link you provided shows a proper regular expression visualization. I was also able to embed the url as you see here
I assume that you are trying to embed the expression as an image which is not the way to go. You have to use an iframe to embed the page onto your website.
Just click the </> embed code next to the visualization to copy the code. And paste it as html as it contains the required
Example:
<iframe
src="https://embed.ihateregex.io/make/JTVFJTVCJTVDJTVDJTJCJTVEJTNGJTVCKCU1RCUzRiU1QjAtOSU1RCU3QjMlN0QlNUIpJTVEJTNGJTVCLSU1QyU1Q3MlNUMlNUMuJTVEJTNGJTVCMC05JTVEJTdCMyU3RCU1Qi0lNUMlNUNzJTVDJTVDLiU1RCUzRiU1QjAtOSU1RCU3QjQlMkM2JTdEJTI0"
height="300" style="width:100%" frameborder="0" />
Hey @geongeorge thank you for your reply.
Example:
/*
Below is my used regex
*/
$regex = '^([A-Z]{5})([0-9]{4})([A-Z]{1})$';
While Embedded image is referring
$regex = '^[A-Z]{4}[0-9]{3}[A-Z]$';
This is what I understood. Do we need to add our regex to any other json apart from static.json file? From where this embed code is generating?
Hey mate, I understand your problem. This is something that people often mistake.
(I'm assuming that you're getting this embed )
I hope this will help:
These diagrams are similar(but not the same) to state diagrams.
Imagine a simple diagram for the expression
^[a-z]{0,2}$
To read this:
Now although the diagram shows at most once next for the pattern [a-z] it means you pass through it once and you are allowed to repeat it once more adding up to 2 just like in the expression.
For the expression: ^[a-z]{0,2}$
Although the diagram shows at most once next for the pattern [a-z] it means you pass through it once and you are allowed to repeat it once more adding up to 2 just like in the expression.
Sorry for the long comment. I thought I'll mention this somewhere so I can link to this in the future
I'm closing this now. Feel free to open a new issue if you still have issues
Hello, I'm working on this repository for adding some regex which I thought may be useful. I followed all the mentioned steps. However I'm not getting proper embed turing machine flow. For my regex it is showing invalid embed image. You can see it here. Is there anything I'm doing wrong? Thank you