fork download
  1. // your code goes here
  2. var regex = /\[fontSize=(\d+)\]/;
  3. var str = "Lorem ipsum dolor sit amet, [b]consectetur adipisici elit[/b], sed eiusmod tempor incidunt ut labore et [fontSize=12]dolore [/fontSize=12] magna aliqua";
  4. var match = regex.exec(str);
  5. var fontSize = match[1];
  6. print(fontSize);
Success #stdin #stdout 0.01s 30104KB
stdin
Standard input is empty
stdout
12