Actionscript:检查字符串是否包含域或子域(Actionscript: check if string contains domain or subdomain)
我需要知道字符串是否包含特定域
我有这样的数组
private var validDomain:Array = new Array( "http://*.site1.com", "http://*.site2.com", "http://*.site3.com", ); private var isValidDomain:Boolean = false; private var URL:string = "http://mysub.site2.com";
现在我会检查我的字符串是否有效,所以我想是这样的:
for each (var domain_ in validDomain){ if(SOMEREGEX){ isValidDomain=true; } }
我把什么放在SOMEREGEX?!
I need to know if a string contains a specific domain
I have an array like this
private var validDomain:Array = new Array( "http://*.site1.com", "http://*.site2.com", "http://*.site3.com", ); private var isValidDomain:Boolean = false; private var URL:string = "http://mysub.site2.com";
now i would check if my string is valid, so i think something like that:
for each (var domain_ in validDomain){ if(SOMEREGEX){ isValidDomain=true; } }
What i put in SOMEREGEX?!
原文:https://stackoverflow.com/questions/28029435
满意答案
事实证明,我还必须将更新的主题作为道具传递给我的App组件(在层次结构中的Root下面)。 看起来它与主题通过上下文传递并且更改组件中的prop以配置主题的事实不足以触发所需的更新。
Turns out I had to also pass the updated theme as a prop to my App component (just below Root in the hierarchy). Seems like it's to do with the fact that the theme is passed via the context and changing a prop in the component that configures the theme wasn't enough to trigger the required updates.
相关问答
更多redux商店应该只保留非UI状态吗?(Should the redux store keep only non-UI states?)
Material-ui TextField搞乱了react-redux(Material-ui TextField messing up with react-redux)
如何通过Redux商店动态更新Material UI主题?(How can I update Material UI theme dynamically via Redux store?)
ReactJS + Redux:如何使用Material-UI的RaisedButton作为?(ReactJS + Redux: How to use Material-UI's RaisedButton as ?)
ReactJS + Redux - Material-UI:如何使 浮动?(ReactJS + Redux - Material-UI: How to make floatable?)
我如何将全局主题实现为React Material UI?(How do I implement global theme to React Material UI?)
如何在React Material-UI中应用字体主题?(How do I apply a Font Theme in React Material-UI?)
Redux商店已更新,但UI未更新(Redux store is updated but UI is not)
由于重新渲染,在使用material-ui-redux-form时无法输入输入字段(can't type in input fields when using material-ui-redux-form due to re rendering)
带有Redux的Material UI v1 - 如何导出(Material UI v1 with Redux - How to export)
相关文章
更多redis 字符串(String) SET 操作
Java String类
遍历字符串每个字符,Stringreader是不是要比string.toCharArray来的快?
Java 中String , StringBuffer 和StringBuilder
怎么得到String数组?
mybatis There is no getter for property named 'xx' in 'class java.lang.String
新手请教重写方法时,参数 Map<String, String> 提示 is not generic 错误
字符串应用之字符串编码转换
Python 字符串操作
最新问答
更多获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
如何通过引用返回对象?(How is returning an object by reference possible?)
矩阵如何存储在内存中?(How are matrices stored in memory?)
每个请求的Java新会话?(Java New Session For Each Request?)
css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
xcode语法颜色编码解释?(xcode syntax color coding explained?)
在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
Copyright ©2023 peixunduo.com All Rights Reserved.粤ICP备14003112号
本站部分内容来源于互联网,仅供学习和参考使用,请莫用于商业用途。如有侵犯你的版权,请联系我们(neng862121861#163.com),本站将尽快处理。谢谢合作!