如何使PHP匹配正则表达式不匹配线?

时间:2015-06-20 14:39:53

标签: php regex

我的代码是

test=>1; test; test=>123; 

asdf
test=>[[test]]

匹配以下文字

ec_set('test',1);; test; ec_set('test',123);; ec_set('

asdf
test',[[test]]);

结果

输出过线

ec_set('test',1);; test; ec_set('test',123);; 

asdf
ec_set('test',[[test]]);

如何制作

time = np.array([x[1] for x in enumerate(df['epoch_time'])])    
byte = np.array([x[1] for x in enumerate(df['byte_transfer'])]) 

fit = np.polyfit(time, byte, n) # step up n value here, 
                                # where n is the degree of the polynomial 
yp = np.poly1d(fit)
print yp                        # displays function in cx^n +- cx^n-1...c format

plt.plot(x, yp(x), '-')

plt.xlabel('Time')    
plt.ylabel('Bytes Transfered')    
plt.title('Trend')    
plt.plot(time, byte,'o')    
plt.show()

2 个答案:

答案 0 :(得分:1)

([^;\s]+)=>([^;\s]+)

试试这个。看看演示。

https://regex101.com/r/vH0iN5/4

答案 1 :(得分:0)

试试这个:

this.attendees.$set(data.userToken, data);